mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Use account rather than currentAccount again
This commit is contained in:
parent
ae669971c9
commit
fd76ce6a59
1 changed files with 1 additions and 5 deletions
|
@ -93,12 +93,8 @@ class AccountViewModel : ViewModel() {
|
||||||
reloadForActivity: Boolean = false
|
reloadForActivity: Boolean = false
|
||||||
) {
|
) {
|
||||||
if (reloadForActivity) {
|
if (reloadForActivity) {
|
||||||
val currentAccount = DataStoreHelper.accounts.firstOrNull {
|
|
||||||
it.keyIndex == DataStoreHelper.selectedKeyIndex
|
|
||||||
}
|
|
||||||
|
|
||||||
_accounts.postValue(getAccounts(context))
|
_accounts.postValue(getAccounts(context))
|
||||||
_selectedKeyIndex.postValue(getAccounts(context).indexOf(currentAccount))
|
_selectedKeyIndex.postValue(getAccounts(context).indexOf(account))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue