diff --git a/Config/BWIBuildSettings.swift b/Config/BWIBuildSettings.swift index 61491f6ce..940214fdd 100644 --- a/Config/BWIBuildSettings.swift +++ b/Config/BWIBuildSettings.swift @@ -489,8 +489,11 @@ class BWIBuildSettings: NSObject { // MARK: - Message Bubbles bwi show in our menu and only for beta builds - var bwiShowMessageBubbles = false + var bwiShowMessageBubbleSettings = false // bwi disable encrypted option in message context menu var roomContextualMenuShowEncryptionOption = false + + // bwi disable side menu coach message + var showSideMenuCoachMessage = false } diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index cedb5a913..515af3545 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -3338,20 +3338,22 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti - (void)onRoomAvatarTap:(UITapGestureRecognizer *)recognizer { - SingleImagePickerPresenter *singleImagePickerPresenter = [[SingleImagePickerPresenter alloc] initWithSession:self.mainSession]; - singleImagePickerPresenter.delegate = self; - - UIView *sourceView; - - NSIndexPath *indexPath = [_tableViewSections exactIndexPathForRowTag:ROOM_SETTINGS_MAIN_SECTION_ROW_PHOTO sectionTag:SECTION_TAG_MAIN]; - if (indexPath) - { - sourceView = [self.tableView cellForRowAtIndexPath:indexPath]; + if (!mxRoom.isDirect || BWIBuildSettings.shared.showUnrelatedRoomSettingsForDirectMessages) { + SingleImagePickerPresenter *singleImagePickerPresenter = [[SingleImagePickerPresenter alloc] initWithSession:self.mainSession]; + singleImagePickerPresenter.delegate = self; + + UIView *sourceView; + + NSIndexPath *indexPath = [_tableViewSections exactIndexPathForRowTag:ROOM_SETTINGS_MAIN_SECTION_ROW_PHOTO sectionTag:SECTION_TAG_MAIN]; + if (indexPath) + { + sourceView = [self.tableView cellForRowAtIndexPath:indexPath]; + } + + [singleImagePickerPresenter presentFrom:self sourceView:sourceView sourceRect:sourceView.bounds animated:YES]; + + self.imagePickerPresenter = singleImagePickerPresenter; } - - [singleImagePickerPresenter presentFrom:self sourceView:sourceView sourceRect:sourceView.bounds animated:YES]; - - self.imagePickerPresenter = singleImagePickerPresenter; } - (void)toggleRoomNotification:(UISwitch*)theSwitch diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index e35feab29..f80824591 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -4959,7 +4959,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> if (RiotSettings.shared.settingsScreenShowSimpleTimeLineOptions) { [timelineSection addRowWithTag:TIMELINE_SIMPLE_INDEX]; } else { - if (BWIBuildSettings.shared.bwiShowMessageBubbles) + if (BWIBuildSettings.shared.bwiShowMessageBubbleSettings) { [timelineSection addRowWithTag:USER_INTERFACE_TIMELINE_STYLE_INDEX]; } diff --git a/Riot/Modules/TabBar/TabBarCoordinator.swift b/Riot/Modules/TabBar/TabBarCoordinator.swift index 2a020650b..8d0c36ba8 100644 --- a/Riot/Modules/TabBar/TabBarCoordinator.swift +++ b/Riot/Modules/TabBar/TabBarCoordinator.swift @@ -759,7 +759,7 @@ final class TabBarCoordinator: NSObject, SplitViewMasterCoordinatorProtocol { private var windowOverlay: WindowOverlayPresenter? func showCoachMessageIfNeeded(with session: MXSession) { - if !RiotSettings.shared.slideMenuRoomsCoachMessageHasBeenDisplayed { + if !RiotSettings.shared.slideMenuRoomsCoachMessageHasBeenDisplayed && BWIBuildSettings.shared.showSideMenuCoachMessage { let isAuthenticated = MXKAccountManager.shared().activeAccounts.first != nil || MXKAccountManager.shared().accounts.first?.isSoftLogout == false if isAuthenticated, let spaceService = session.spaceService, masterTabBarController.presentedViewController == nil, navigationRouter.modules.count == 1 {