MESSENGER-2762 Initial Merge

This commit is contained in:
Frank Rotermund
2022-03-17 15:51:23 +01:00
parent ecae8d618f
commit c2108a2178
384 changed files with 17708 additions and 1928 deletions
@@ -1,5 +1,6 @@
/*
Copyright 2020 New Vector Ltd
Copyright (c) 2021 BWI GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -378,7 +379,6 @@ enum {
MXDeviceInfo *deviceInfo = [self.mainSession.crypto deviceWithDeviceId:deviceId ofUser:self.mainSession.myUser.userId];
cell.textLabel.numberOfLines = 0;
[cell vc_setAccessoryDisclosureIndicatorWithCurrentTheme];
if (deviceInfo.trustLevel.isVerified)
{
@@ -390,6 +390,12 @@ enum {
cell.textLabel.text = [VectorL10n manageSessionNotTrusted];
cell.imageView.image = [UIImage imageNamed:@"encryption_warning"];
}
if (BuildSettings.bwiDisableSecuritySettingsUntrustedDevices && !deviceInfo.trustLevel.isVerified) {
cell.accessoryType = UITableViewCellAccessoryNone;
} else {
[cell vc_setAccessoryDisclosureIndicatorWithCurrentTheme];
}
return cell;
}
@@ -550,6 +556,21 @@ enum {
return 24;
}
- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (BuildSettings.bwiDisableSecuritySettingsUntrustedDevices) {
if (indexPath.section == SECTION_SESSION_INFO && indexPath.row == SESSION_INFO_TRUST) {
NSString *deviceId = device.deviceId;
MXDeviceInfo *deviceInfo = [self.mainSession.crypto deviceWithDeviceId:deviceId ofUser:self.mainSession.myUser.userId];
// unverified devices should not be selectable
if (!deviceInfo.trustLevel.isVerified) {
return nil;
}
}
}
return indexPath;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (self.tableView == tableView)