mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Security screens: Update automatically shields when the trust changes.
This commit is contained in:
@@ -114,6 +114,8 @@ enum {
|
||||
|
||||
}];
|
||||
[self userInterfaceThemeDidChange];
|
||||
|
||||
[self registerDeviceChangesNotification];
|
||||
}
|
||||
|
||||
- (void)userInterfaceThemeDidChange
|
||||
@@ -247,6 +249,29 @@ enum {
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Data update
|
||||
|
||||
- (void)registerDeviceChangesNotification
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(onDeviceInfoTrustLevelDidChangeNotification:)
|
||||
name:MXDeviceInfoTrustLevelDidChangeNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void)onDeviceInfoTrustLevelDidChangeNotification:(NSNotification*)notification
|
||||
{
|
||||
MXDeviceInfo *deviceInfo = notification.object;
|
||||
|
||||
NSString *deviceId = deviceInfo.deviceId;
|
||||
if ([deviceId isEqualToString:device.deviceId])
|
||||
{
|
||||
[self reloadDeviceWithCompletion:^{
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Segues
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
|
||||
|
||||
Reference in New Issue
Block a user