mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
MESSENGER-2762 Initial Merge
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user