Settings: Update the screen if IS is changed from another device

#2665
This commit is contained in:
manuroe
2019-09-05 12:22:18 +02:00
parent 12f7ca94ab
commit 3e4b1a68e3
@@ -322,6 +322,8 @@ SingleImagePickerPresenterDelegate>
[self refreshSettings];
}];
[self registerAccountDataDidChangeIdentityServerNotification];
// Add each matrix session, to update the view controller appearance according to mx sessions state
NSArray *sessions = [AppDelegate theDelegate].mxSessions;
@@ -4537,4 +4539,17 @@ SingleImagePickerPresenterDelegate>
[self.tableView reloadData];
}
#pragma mark - Identity Server updates
- (void)registerAccountDataDidChangeIdentityServerNotification
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAccountDataDidChangeIdentityServerNotification:) name:kMXSessionAccountDataDidChangeIdentityServerNotification object:nil];
}
- (void)handleAccountDataDidChangeIdentityServerNotification:(NSNotification*)notification
{
[self refreshSettings];
}
@end