mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
@@ -39,6 +39,7 @@
|
||||
|
||||
// Observer that checks when the Authentification view controller has gone.
|
||||
id authViewControllerObserver;
|
||||
id authViewRemovedAccountObserver;
|
||||
|
||||
// The parameters to pass to the Authentification view controller.
|
||||
NSDictionary *authViewControllerRegistrationParameters;
|
||||
@@ -231,6 +232,11 @@
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:authViewControllerObserver];
|
||||
authViewControllerObserver = nil;
|
||||
}
|
||||
if (authViewRemovedAccountObserver)
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:authViewRemovedAccountObserver];
|
||||
authViewRemovedAccountObserver = nil;
|
||||
}
|
||||
|
||||
if (kThemeServiceDidChangeThemeNotificationObserver)
|
||||
{
|
||||
@@ -664,6 +670,15 @@
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:authViewControllerObserver];
|
||||
authViewControllerObserver = nil;
|
||||
}];
|
||||
|
||||
authViewRemovedAccountObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kMXKAccountManagerDidRemoveAccountNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
|
||||
|
||||
// The user has cleared data for their soft logged out account
|
||||
_authViewController = nil;
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:authViewRemovedAccountObserver];
|
||||
authViewRemovedAccountObserver = nil;
|
||||
}];
|
||||
|
||||
// Forward parameters if any
|
||||
if (authViewControllerRegistrationParameters)
|
||||
|
||||
Reference in New Issue
Block a user