diff --git a/Riot/Assets/Riot-Defaults.plist b/Riot/Assets/Riot-Defaults.plist index 28d0d04b8..95dea3dd0 100644 --- a/Riot/Assets/Riot-Defaults.plist +++ b/Riot/Assets/Riot-Defaults.plist @@ -20,8 +20,6 @@ syncLocalContacts - createConferenceCallsWithJitsi - enableRageShake maxAllowedMediaCacheSize diff --git a/Riot/Managers/Settings/RiotSettings.swift b/Riot/Managers/Settings/RiotSettings.swift index 014f4502d..402e6f3ec 100644 --- a/Riot/Managers/Settings/RiotSettings.swift +++ b/Riot/Managers/Settings/RiotSettings.swift @@ -27,7 +27,6 @@ final class RiotSettings: NSObject { static let identityServerUrlString = "identityserverurl" static let enableCrashReport = "enableCrashReport" static let enableRageShake = "enableRageShake" - static let createConferenceCallsWithJitsi = "createConferenceCallsWithJitsi" static let userInterfaceTheme = "userInterfaceTheme" static let notificationsShowDecryptedContent = "showDecryptedContent" static let pinRoomsWithMissedNotifications = "pinRoomsWithMissedNotif" @@ -187,14 +186,6 @@ final class RiotSettings: NSObject { // MARK: Labs - var createConferenceCallsWithJitsi: Bool { - get { - return defaults.bool(forKey: UserDefaultsKeys.createConferenceCallsWithJitsi) - } set { - defaults.set(newValue, forKey: UserDefaultsKeys.createConferenceCallsWithJitsi) - } - } - // MARK: Calls /// Indicate if `allowStunServerFallback` settings has been set once. diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 5eb48d9e0..d03a13a13 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -3616,9 +3616,8 @@ NSNotificationName const RoomViewControllerViewDidDisappearNotification = @"Room [[AppDelegate theDelegate].callPresenter displayJitsiCallWithWidget:jitsiWidget]; } - // If enabled, create the conf using jitsi widget and open it directly - else if (RiotSettings.shared.createConferenceCallsWithJitsi - && self.roomDataSource.room.summary.membersCount.joined > 2) + // Create the conf using jitsi widget and open it directly + else if (self.roomDataSource.room.summary.membersCount.joined > 2) { [self startActivityIndicator]; diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 12adb0364..f6341d140 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -140,11 +140,6 @@ enum OTHER_REPORT_BUG_INDEX, }; -enum -{ - LABS_USE_JITSI_WIDGET_INDEX = 0, -}; - enum { SECURITY_BUTTON_INDEX = 0, @@ -480,9 +475,11 @@ TableViewSectionsDelegate> if (BuildSettings.settingsScreenShowLabSettings) { Section *sectionLabs = [Section sectionWithTag:SECTION_TAG_LABS]; - [sectionLabs addRowWithTag:LABS_USE_JITSI_WIDGET_INDEX]; sectionLabs.headerTitle = NSLocalizedStringFromTable(@"settings_labs", @"Vector", nil); - [tmpSections addObject:sectionLabs]; + if (sectionLabs.hasAnyRows) + { + [tmpSections addObject:sectionLabs]; + } } if ([groupsDataSource numberOfSectionsInTableView:self.tableView] && groupsDataSource.joinedGroupsSection != -1) @@ -2244,18 +2241,7 @@ TableViewSectionsDelegate> } else if (section == SECTION_TAG_LABS) { - if (row == LABS_USE_JITSI_WIDGET_INDEX) - { - MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; - - labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_labs_create_conference_with_jitsi", @"Vector", nil); - labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.createConferenceCallsWithJitsi; - labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; - - [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleJitsiForConference:) forControlEvents:UIControlEventTouchUpInside]; - - cell = labelAndSwitchCell; - } + } else if (section == SECTION_TAG_FLAIR) { @@ -2944,18 +2930,6 @@ TableViewSectionsDelegate> } } -- (void)toggleJitsiForConference:(id)sender -{ - if (sender && [sender isKindOfClass:UISwitch.class]) - { - UISwitch *switchButton = (UISwitch*)sender; - - RiotSettings.shared.createConferenceCallsWithJitsi = switchButton.isOn; - - [self.tableView reloadData]; - } -} - - (void)togglePinRoomsWithMissedNotif:(id)sender { UISwitch *switchButton = (UISwitch*)sender;