mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Fix navigation after clear data
This commit is contained in:
@@ -871,7 +871,7 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
|
||||
|
||||
- (void)logout:(void (^)(void))completion
|
||||
{
|
||||
if (!mxSession)
|
||||
if (!mxSession || !mxSession.matrixRestClient)
|
||||
{
|
||||
MXLogDebug(@"[MXKAccount] logout: Need to open the closed session to make a logout request");
|
||||
id<MXStore> store = [[[MXKAccountManager sharedManager].storeClass alloc] init];
|
||||
@@ -958,6 +958,12 @@ static NSArray<NSNumber*> *initialSyncSilentErrorsHTTPStatusCodes;
|
||||
|
||||
- (void)softLogout
|
||||
{
|
||||
if (_isSoftLogout)
|
||||
{
|
||||
// do not close the session if already soft logged out
|
||||
// it may break the current logout request and resetting session credentials can cause crashes
|
||||
return;
|
||||
}
|
||||
_isSoftLogout = YES;
|
||||
[[MXKAccountManager sharedManager] saveAccounts];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user