MESSENGER-3671 Merge FOSS 1.9.8

Conflicts:
 - CommonConfiguration.swift
 - BuildSettings.swift
 - Generated/images.Swift
 - RoomMemberDetailsViewController.m
 - LiveLocationSharingViewModell
-  PinCodeEnterViewController.m
This commit is contained in:
Frank Rotermund
2022-10-05 15:47:27 +02:00
744 changed files with 6999 additions and 3819 deletions
+46 -3
View File
@@ -222,7 +222,9 @@ typedef NS_ENUM(NSUInteger, LABS_ENABLE)
LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX = 0,
LABS_ENABLE_THREADS_INDEX,
LABS_ENABLE_AUTO_REPORT_DECRYPTION_ERRORS,
LABS_ENABLE_LIVE_LOCATION_SHARING
LABS_ENABLE_LIVE_LOCATION_SHARING,
LABS_ENABLE_NEW_SESSION_MANAGER,
LABS_ENABLE_NEW_CLIENT_INFO_FEATURE
};
typedef NS_ENUM(NSUInteger, SECURITY)
@@ -494,7 +496,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
Section *sectionSecurity = [Section sectionWithTag:SECTION_TAG_SECURITY];
[sectionSecurity addRowWithTag:SECURITY_BUTTON_INDEX];
if (BuildSettings.deviceManagerEnabled)
if (RiotSettings.shared.enableNewSessionManager)
{
// NOTE: Add device manager entry point in the security section atm for debug purpose
[sectionSecurity addRowWithTag:DEVICE_MANAGER_INDEX];
@@ -748,6 +750,8 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
{
[sectionLabs addRowWithTag:LABS_ENABLE_LIVE_LOCATION_SHARING];
}
[sectionLabs addRowWithTag:LABS_ENABLE_NEW_SESSION_MANAGER];
[sectionLabs addRowWithTag:LABS_ENABLE_NEW_CLIENT_INFO_FEATURE];
sectionLabs.headerTitle = [VectorL10n settingsLabs];
if (sectionLabs.hasAnyRows)
{
@@ -2850,6 +2854,30 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
{
cell = [self buildLiveLocationSharingCellForTableView:tableView atIndexPath:indexPath];
}
else if (row == LABS_ENABLE_NEW_SESSION_MANAGER)
{
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableNewSessionManager];
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableNewSessionManager;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableNewSessionManager:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
else if (row == LABS_ENABLE_NEW_CLIENT_INFO_FEATURE)
{
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnableNewClientInfoFeature];
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.enableClientInformationFeature;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableNewClientInfoFeature:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
}
else if (section == SECTION_TAG_SECURITY)
{
@@ -3692,6 +3720,19 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
[[AppDelegate theDelegate] restoreEmptyDetailsViewController];
}
- (void)toggleEnableNewSessionManager:(UISwitch *)sender
{
RiotSettings.shared.enableNewSessionManager = sender.isOn;
[self updateSections];
}
- (void)toggleEnableNewClientInfoFeature:(UISwitch *)sender
{
BOOL isEnabled = sender.isOn;
RiotSettings.shared.enableClientInformationFeature = isEnabled;
MXSDKOptions.sharedInstance.enableNewClientInformationFeature = isEnabled;
}
- (void)togglePinRoomsWithMissedNotif:(UISwitch *)sender
{
RiotSettings.shared.pinRoomsWithMissedNotificationsOnHome = sender.isOn;
@@ -4130,11 +4171,13 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
msisdn = [NSString stringWithFormat:@"+%@", [e164 substringFromIndex:2]];
}
NSString *countryCode = newPhoneNumberCell.isoCountryCode;
[self showAuthenticationIfNeededForAdding:kMX3PIDMediumMSISDN withSession:session completion:^(NSDictionary *authParams) {
[self startActivityIndicator];
__block MX3PidAddSession *new3Pid;
new3Pid = [session.threePidAddManager startAddPhoneNumberSessionWithPhoneNumber:msisdn countryCode:nil success:^{
new3Pid = [session.threePidAddManager startAddPhoneNumberSessionWithPhoneNumber:msisdn countryCode:countryCode success:^{
[self showValidationMsisdnDialogWithMessage:[VectorL10n accountMsisdnValidationMessage] for3PidAddSession:new3Pid threePidAddManager:session.threePidAddManager authenticationParameters:authParams];