mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
De-labs location sharing and enable it by default.
This commit is contained in:
parent
5ff5a7065b
commit
07f5851421
3 changed files with 2 additions and 39 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
@ -382,14 +376,6 @@ 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;
|
||||
|
|
Loading…
Reference in a new issue