@@ -614,6 +614,46 @@ + (void)hasRespondedToSurveyWithToken:(NSString *)surveyToken {
614614 [channel invokeMethod: @" hasRespondedToSurveyCallback" arguments: boolNumber];
615615}
616616
617+ /* *
618+ * Shows the UI for feature requests list
619+ */
620+ + (void )showFeatureRequests {
621+ [IBGFeatureRequests show ];
622+ }
623+
624+ /* *
625+ * Sets whether email field is required or not when submitting
626+ * new-feature-request/new-comment-on-feature
627+ *
628+ * @param isEmailRequired set true to make email field required
629+ * @param actionTypes Bitwise-or of actions
630+ */
631+ + (void )setEmailFieldRequiredForFeatureRequests : (NSNumber *)isEmailFieldRequired forAction : (NSArray *)actionTypesArray {
632+ NSDictionary *constants = [self constants ];
633+ NSInteger actionTypes = 0 ;
634+ for (NSString * actionType in actionTypesArray) {
635+ actionTypes |= ((NSNumber *) constants[actionType]).integerValue ;
636+ }
637+ BOOL boolValue = [isEmailFieldRequired boolValue ];
638+ [IBGFeatureRequests setEmailFieldRequired: boolValue forAction: actionTypes];
639+ }
640+
641+ /* *
642+ * Manual invocation for chats view.
643+ */
644+ + (void )showChats {
645+ [IBGChats show ];
646+ }
647+
648+ /* *
649+ * Enables and disables everything related to creating new chats.
650+ * @param {boolean} isEnabled
651+ */
652+ + (void )setChatsEnabled : (NSNumber *)isEnabled {
653+ BOOL boolValue = [isEnabled boolValue ];
654+ IBGChats.enabled = boolValue;
655+ }
656+
617657
618658+ (NSDictionary *)constants {
619659 return @{
@@ -696,6 +736,11 @@ + (NSDictionary *)constants {
696736 @" ExtendedBugReportMode.enabledWithRequiredFields" : @(IBGExtendedBugReportModeEnabledWithRequiredFields),
697737 @" ExtendedBugReportMode.enabledWithOptionalFields" : @(IBGExtendedBugReportModeEnabledWithOptionalFields),
698738 @" ExtendedBugReportMode.disabled" : @(IBGExtendedBugReportModeDisabled),
739+
740+ @" ActionType.allActions" : @(IBGActionAllActions),
741+ @" ActionType.reportBug" : @(IBGActionReportBug),
742+ @" ActionType.requestNewFeature" : @(IBGActionRequestNewFeature),
743+ @" ActionType.addCommentToFeature" : @(IBGActionAddCommentToFeature),
699744 };
700745};
701746
0 commit comments