never use 0 account ids to prevent caching problems (#999)
This commit is contained in:
parent
8014b1296d
commit
fe535c2e0c
1 changed files with 3 additions and 1 deletions
|
@ -58,7 +58,9 @@ class AccountManager(db: AppDatabase) {
|
||||||
accountDao.insertOrReplace(it)
|
accountDao.insertOrReplace(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
activeAccount = AccountEntity(id = 0, domain = domain.toLowerCase(), accessToken = accessToken, isActive = true)
|
val maxAccountId = accounts.maxBy { it.id }?.id ?: 0
|
||||||
|
val newAccountId = maxAccountId + 1
|
||||||
|
activeAccount = AccountEntity(id = newAccountId, domain = domain.toLowerCase(), accessToken = accessToken, isActive = true)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue