mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 23:47:44 +02:00
Merge pull request #2697 from vector-im/riot_2665
Settings: Update the screen if IS is changed from another device
This commit is contained in:
@@ -417,7 +417,7 @@
|
||||
NSLog(@"[ForgotPasswordInputsView] checkIdentityServerRequirement: %@", matrixVersions.doesServerRequireIdentityServerParam ? @"YES": @"NO");
|
||||
|
||||
if (matrixVersions.doesServerRequireIdentityServerParam
|
||||
&& !mxRestClient.credentials.identityServer)
|
||||
&& !mxRestClient.identityServer)
|
||||
{
|
||||
failure([NSError errorWithDomain:MXKAuthErrorDomain
|
||||
code:0
|
||||
|
||||
@@ -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;
|
||||
@@ -3775,7 +3777,7 @@ SingleImagePickerPresenterDelegate>
|
||||
NSLog(@"[SettingsViewController] checkIdentityServerRequirement: %@", matrixVersions.doesServerRequireIdentityServerParam ? @"YES": @"NO");
|
||||
|
||||
if (matrixVersions.doesServerRequireIdentityServerParam
|
||||
&& !mxRestClient.credentials.identityServer)
|
||||
&& !mxRestClient.identityServer)
|
||||
{
|
||||
NSString *message;
|
||||
if ([medium isEqualToString:kMX3PIDMediumMSISDN])
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user