mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Merge branch 'develop' into ismail/6175_signout_from_all
This commit is contained in:
@@ -872,7 +872,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];
|
||||
@@ -959,6 +959,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