[Voice Broadcast] Aggregate the chunks of voice messages in room timeline (#6891)

This commit is contained in:
Yoan Pintas
2022-10-17 18:23:47 +02:00
committed by GitHub
parent bed02f8bc9
commit 58551e04c1
42 changed files with 1230 additions and 55 deletions
+21 -1
View File
@@ -175,7 +175,8 @@ typedef NS_ENUM(NSUInteger, LABS_ENABLE)
LABS_ENABLE_LIVE_LOCATION_SHARING,
LABS_ENABLE_NEW_SESSION_MANAGER,
LABS_ENABLE_NEW_CLIENT_INFO_FEATURE,
LABS_ENABLE_WYSIWYG_COMPOSER
LABS_ENABLE_WYSIWYG_COMPOSER,
LABS_ENABLE_VOICE_BROADCAST
};
typedef NS_ENUM(NSUInteger, SECURITY)
@@ -599,6 +600,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
{
[sectionLabs addRowWithTag:LABS_ENABLE_WYSIWYG_COMPOSER];
}
[sectionLabs addRowWithTag:LABS_ENABLE_VOICE_BROADCAST];
sectionLabs.headerTitle = [VectorL10n settingsLabs];
if (sectionLabs.hasAnyRows)
{
@@ -2570,6 +2572,19 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
cell = labelAndSwitchCell;
}
else if (row == LABS_ENABLE_VOICE_BROADCAST)
{
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableVoiceBroadcast];
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableVoiceBroadcast;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableVoiceBroadcastFeature:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
}
else if (section == SECTION_TAG_SECURITY)
{
@@ -3335,6 +3350,11 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
RiotSettings.shared.enableWysiwygComposer = sender.isOn;
}
- (void)toggleEnableVoiceBroadcastFeature:(UISwitch *)sender
{
RiotSettings.shared.enableVoiceBroadcast = sender.isOn;
}
- (void)togglePinRoomsWithMissedNotif:(UISwitch *)sender
{
RiotSettings.shared.pinRoomsWithMissedNotificationsOnHome = sender.isOn;