mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Don't switch accounts when deleting unless deleting the current account
This commit is contained in:
parent
352f90a08b
commit
76f63a7aa2
1 changed files with 4 additions and 2 deletions
|
@ -69,8 +69,10 @@ object AccountHelper {
|
||||||
currentAccounts.removeIf { it.keyIndex == account.keyIndex }
|
currentAccounts.removeIf { it.keyIndex == account.keyIndex }
|
||||||
DataStoreHelper.accounts = currentAccounts.toTypedArray()
|
DataStoreHelper.accounts = currentAccounts.toTypedArray()
|
||||||
|
|
||||||
// Update UI
|
if (account.keyIndex == DataStoreHelper.selectedKeyIndex) {
|
||||||
setAccount(getDefaultAccount(context))
|
setAccount(getDefaultAccount(context))
|
||||||
|
}
|
||||||
|
|
||||||
callback.invoke(null)
|
callback.invoke(null)
|
||||||
dialog?.dismissSafe()
|
dialog?.dismissSafe()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue