mirror of
https://codeberg.org/NextPush/nextpush-android.git
synced 2024-12-26 09:42:39 +01:00
Fix account update on login/logout
This commit is contained in:
parent
6140b2a422
commit
94cd3badba
@ -16,13 +16,16 @@ object AccountFactory {
|
||||
AccountType.SSO -> SSOAccount(context)
|
||||
AccountType.Direct -> DirectAccount(context)
|
||||
}.takeIf { !connected || it.connected }.also {
|
||||
account = it
|
||||
if (connected) {
|
||||
account = it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun logout(context: Context) {
|
||||
getAccount(context)?.logout(context)
|
||||
account = null
|
||||
}
|
||||
|
||||
fun Context.setTypeSSO() {
|
||||
|
Loading…
Reference in New Issue
Block a user