mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Add an (optional) prompt when sending a video to select its size.
Use high quality when filming video in-app.
This commit is contained in:
@@ -89,7 +89,8 @@ enum
|
||||
|
||||
enum
|
||||
{
|
||||
MEDIA_SETTINGS_CONFIRM_IMAGE_SIZE = 0
|
||||
MEDIA_SETTINGS_CONFIRM_IMAGE_SIZE = 0,
|
||||
MEDIA_SETTINGS_CONFIRM_VIDEO_SIZE
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -355,10 +356,11 @@ TableViewSectionsDelegate>
|
||||
sectionUserSettings.headerTitle = NSLocalizedStringFromTable(@"settings_user_settings", @"Vector", nil);
|
||||
[tmpSections addObject:sectionUserSettings];
|
||||
|
||||
if (BuildSettings.settingsScreenShowConfirmImageSize)
|
||||
if (BuildSettings.settingsScreenShowConfirmMediaSize)
|
||||
{
|
||||
Section *sectionMedia = [Section sectionWithTag:SECTION_TAG_MEDIA];
|
||||
[sectionMedia addRowWithTag:MEDIA_SETTINGS_CONFIRM_IMAGE_SIZE];
|
||||
[sectionMedia addRowWithTag:MEDIA_SETTINGS_CONFIRM_VIDEO_SIZE];
|
||||
sectionMedia.headerTitle = NSLocalizedStringFromTable(@"settings_media", @"Vector", nil);
|
||||
[tmpSections addObject:sectionMedia];
|
||||
}
|
||||
@@ -1833,6 +1835,18 @@ TableViewSectionsDelegate>
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleConfirmImageSize:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
else if (row == MEDIA_SETTINGS_CONFIRM_VIDEO_SIZE)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_confirm_video_size", @"Vector", nil);
|
||||
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.promptForVideoConversionPreset;
|
||||
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
|
||||
labelAndSwitchCell.mxkSwitch.enabled = YES;
|
||||
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleConfirmVideoSize:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
cell = labelAndSwitchCell;
|
||||
}
|
||||
}
|
||||
@@ -2877,6 +2891,11 @@ TableViewSectionsDelegate>
|
||||
RiotSettings.shared.roomInputToolbarCompressionMode = sender.on ? MXKRoomInputToolbarCompressionModePrompt : MXKRoomInputToolbarCompressionModeNone;
|
||||
}
|
||||
|
||||
- (void)toggleConfirmVideoSize:(UISwitch *)sender
|
||||
{
|
||||
RiotSettings.shared.promptForVideoConversionPreset = sender.on;
|
||||
}
|
||||
|
||||
- (void)togglePushNotifications:(UISwitch *)sender
|
||||
{
|
||||
// Check first whether the user allow notification from system settings
|
||||
|
||||
Reference in New Issue
Block a user