mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 06:06:57 +02:00
Warn unknown devices: update the unknown devices list once a device has been verified
This commit is contained in:
@@ -22,14 +22,10 @@
|
||||
|
||||
#import "VectorDesignValues.h"
|
||||
|
||||
#import "EncryptionInfoView.h"
|
||||
|
||||
@interface UsersDevicesViewController ()
|
||||
{
|
||||
MXUsersDevicesMap<MXDeviceInfo*> *usersDevices;
|
||||
MXSession *mxSession;
|
||||
|
||||
EncryptionInfoView *encryptionInfoView;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -150,9 +146,11 @@
|
||||
if (verificationStatus == MXDeviceVerified)
|
||||
{
|
||||
// Prompt the user before marking as verified the device.
|
||||
encryptionInfoView = [[EncryptionInfoView alloc] initWithDeviceInfo:deviceTableViewCell.deviceInfo andMatrixSession:mxSession];
|
||||
EncryptionInfoView *encryptionInfoView = [[EncryptionInfoView alloc] initWithDeviceInfo:deviceTableViewCell.deviceInfo andMatrixSession:mxSession];
|
||||
[encryptionInfoView onButtonPressed:encryptionInfoView.verifyButton];
|
||||
|
||||
encryptionInfoView.delegate = self;
|
||||
|
||||
// Add shadow on added view
|
||||
encryptionInfoView.layer.cornerRadius = 5;
|
||||
encryptionInfoView.layer.shadowOffset = CGSizeMake(0, 1);
|
||||
@@ -208,6 +206,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - MXKEncryptionInfoViewDelegate
|
||||
|
||||
- (void)encryptionInfoView:(MXKEncryptionInfoView *)encryptionInfoView didDeviceInfoVerifiedChange:(MXDeviceInfo *)deviceInfo
|
||||
{
|
||||
// Update our map
|
||||
MXDeviceInfo *device = [usersDevices objectForDevice:deviceInfo.deviceId forUser:deviceInfo.userId];
|
||||
device.verified = deviceInfo.verified;
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - User actions
|
||||
|
||||
- (IBAction)onCancel:(id)sender
|
||||
|
||||
Reference in New Issue
Block a user