mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 19:05:56 +03:00
CleanupSession: start by releasing the session, then empty the databases
This commit is contained in:
parent
73c08e2eeb
commit
4a7e0a5d95
1 changed files with 3 additions and 3 deletions
|
@ -61,6 +61,9 @@ internal class CleanupSession @Inject constructor(
|
|||
Timber.d("Cleanup: cancel pending works...")
|
||||
workManagerProvider.cancelAllWorks()
|
||||
|
||||
Timber.d("Cleanup: release session...")
|
||||
sessionManager.releaseSession(sessionId)
|
||||
|
||||
Timber.d("Cleanup: clear session data...")
|
||||
clearSessionDataTask.execute(Unit)
|
||||
|
||||
|
@ -71,9 +74,6 @@ internal class CleanupSession @Inject constructor(
|
|||
realmKeysUtils.clear(SessionModule.getKeyAlias(userMd5))
|
||||
realmKeysUtils.clear(CryptoModule.getKeyAlias(userMd5))
|
||||
|
||||
Timber.d("Cleanup: release session...")
|
||||
sessionManager.releaseSession(sessionId)
|
||||
|
||||
// Wait for all the Realm instance to be released properly. Closing Realm instance is async.
|
||||
// After that we can safely delete the Realm files
|
||||
waitRealmRelease()
|
||||
|
|
Loading…
Reference in a new issue