Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid falsely shown "Account scheduled for deletion" info
...by setting the correct context. In removeCurrentAccount the WorkManager.getInstance(this) (introduced with commit 943286d) must be WorkManager.getInstance(applicationContext) because otherwise the worker is dropped when the activity is finished and might not do it's work beforehand (race condition?). This results in users that keep the scheduledForDeletion = true so the next time someone tries to login with this user, userManager.checkIfUserIsScheduledForDeletion(loginData.username!!, baseUrl!!).blockingGet() in WebViewLoginController#parseAndLoginFromWebView is true and ApplicationWideMessageHolder.getInstance().messageType is set to ApplicationWideMessageHolder.MessageType.ACCOUNT_SCHEDULED_FOR_DELETION which results in the "The account is scheduled for deletion, and cannot be changed" message in ServerSelectionController. This is just a guess and i was not able to reproduce it. Signed-off-by: Marcel Hibbe <[email protected]>
- Loading branch information