mirror of
https://codeberg.org/NextPush/nextpush-android.git
synced 2025-01-14 02:45:49 +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.SSO -> SSOAccount(context)
|
||||||
AccountType.Direct -> DirectAccount(context)
|
AccountType.Direct -> DirectAccount(context)
|
||||||
}.takeIf { !connected || it.connected }.also {
|
}.takeIf { !connected || it.connected }.also {
|
||||||
|
if (connected) {
|
||||||
account = it
|
account = it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun logout(context: Context) {
|
fun logout(context: Context) {
|
||||||
getAccount(context)?.logout(context)
|
getAccount(context)?.logout(context)
|
||||||
|
account = null
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Context.setTypeSSO() {
|
fun Context.setTypeSSO() {
|
||||||
|
Loading…
Reference in New Issue
Block a user