talk-android/app
Marcel Hibbe ba8df45bc7
avoid falsely shown "Account scheduled for deletion" info
...by setting the correct context.

In removeCurrentAccount
the

WorkManager.getInstance(this) (introduced with commit 943286dd)

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 <dev@mhibbe.de>
2023-08-25 11:24:28 +02:00
..
schemas/com.nextcloud.talk.data.source.local.TalkDatabase
src avoid falsely shown "Account scheduled for deletion" info 2023-08-25 11:24:28 +02:00
build.gradle Merge pull request #3263 from nextcloud/dependabot/gradle/org.mockito-mockito-core-5.5.0 2023-08-23 21:26:58 +02:00
lint.xml
proguard-rules.pro