Write notification account information to the correct account (#3697)
Don't use `accountManager.activeAccount` throughout the code. Instead, get the active account once, and use that over the life of the viewmodel. As shown in https://github.com/tuskyapp/Tusky/issues/3689#issuecomment-1567219338 the active account can change before the view model is destroyed, and if that happens account information for the account will be written to the wrong account.
This commit is contained in:
parent
61374c5180
commit
346dabffc5
5 changed files with 25 additions and 22 deletions
|
|
@ -52,7 +52,7 @@ class AccountManager @Inject constructor(db: AppDatabase) {
|
|||
/**
|
||||
* Adds a new account and makes it the active account.
|
||||
* @param accessToken the access token for the new account
|
||||
* @param domain the domain of the accounts Mastodon instance
|
||||
* @param domain the domain of the account's Mastodon instance
|
||||
* @param clientId the oauth client id used to sign in the account
|
||||
* @param clientSecret the oauth client secret used to sign in the account
|
||||
* @param oauthScopes the oauth scopes granted to the account
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue