diff --git a/Riot/Managers/Settings/RiotSettings.swift b/Riot/Managers/Settings/RiotSettings.swift index a7db6ca04..1b1af2591 100644 --- a/Riot/Managers/Settings/RiotSettings.swift +++ b/Riot/Managers/Settings/RiotSettings.swift @@ -189,9 +189,6 @@ final class RiotSettings: NSObject { @UserDefault(key: "roomScreenAllowFilesAction", defaultValue: BuildSettings.roomScreenAllowFilesAction, storage: defaults) var roomScreenAllowFilesAction - @UserDefault(key: "roomScreenAllowLocationAction", defaultValue: false, storage: defaults) - var roomScreenAllowLocationAction - @UserDefault(key: "roomScreenShowsURLPreviews", defaultValue: true, storage: defaults) var roomScreenShowsURLPreviews diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index a67449730..ba6a57f84 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -1980,7 +1980,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; [self.delegate roomViewControllerDidRequestPollCreationFormPresentation:self]; }]]; } - if (RiotSettings.shared.roomScreenAllowLocationAction) + if (BuildSettings.locationSharingEnabled) { [actionItems addObject:[[RoomActionItem alloc] initWithImage:[UIImage imageNamed:@"action_location"] andAction:^{ MXStrongifyAndReturnIfNil(self); diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index be9326fdb..6575ca4e4 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -51,7 +51,6 @@ typedef NS_ENUM(NSUInteger, SECTION_TAG) { SECTION_TAG_SIGN_OUT = 0, SECTION_TAG_USER_SETTINGS, - SECTION_TAG_LOCATION_SHARING, SECTION_TAG_SENDING_MEDIA, SECTION_TAG_LINKS, SECTION_TAG_SECURITY, @@ -87,11 +86,6 @@ typedef NS_ENUM(NSUInteger, USER_SETTINGS_OFFSET) USER_SETTINGS_PHONENUMBERS_OFFSET = 1000 }; -typedef NS_ENUM(NSUInteger, LOCATION_SHARING) -{ - LOCATION_SHARING_ENABLED -}; - typedef NS_ENUM(NSUInteger, SENDING_MEDIA) { SENDING_MEDIA_CONFIRM_SIZE = 0 @@ -381,15 +375,7 @@ TableViewSectionsDelegate> sectionUserSettings.headerTitle = [VectorL10n settingsUserSettings]; [tmpSections addObject:sectionUserSettings]; - - if (BuildSettings.locationSharingEnabled) - { - Section *sectionLocationSharing = [Section sectionWithTag:SECTION_TAG_LOCATION_SHARING]; - [sectionLocationSharing addRowWithTag:LOCATION_SHARING_ENABLED]; - sectionLocationSharing.headerTitle = VectorL10n.locationSharingSettingsHeader.uppercaseString; - [tmpSections addObject:sectionLocationSharing]; - } - + if (BuildSettings.settingsScreenShowConfirmMediaSize) { Section *sectionMedia = [Section sectionWithTag:SECTION_TAG_SENDING_MEDIA]; @@ -1964,21 +1950,6 @@ TableViewSectionsDelegate> cell = passwordCell; } } - else if (section == SECTION_TAG_LOCATION_SHARING) - { - if (row == LOCATION_SHARING_ENABLED) - { - MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; - - labelAndSwitchCell.mxkLabel.text = VectorL10n.locationSharingSettingsToggleTitle; - labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenAllowLocationAction; - labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; - labelAndSwitchCell.mxkSwitch.enabled = YES; - [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleLocationSharing:) forControlEvents:UIControlEventTouchUpInside]; - - cell = labelAndSwitchCell; - } - } else if (section == SECTION_TAG_SENDING_MEDIA) { if (row == SENDING_MEDIA_CONFIRM_SIZE) @@ -3013,11 +2984,6 @@ TableViewSectionsDelegate> } } -- (void)toggleLocationSharing:(UISwitch *)sender -{ - RiotSettings.shared.roomScreenAllowLocationAction = sender.on; -} - - (void)toggleConfirmMediaSize:(UISwitch *)sender { RiotSettings.shared.showMediaCompressionPrompt = sender.on;