mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Don't use getAccounts() just to count them
This commit is contained in:
parent
42a1f272a2
commit
9b3d13a7d0
2 changed files with 1 additions and 4 deletions
|
@ -17,7 +17,7 @@ import com.lagradost.cloudstream3.ui.AutofitRecyclerView
|
|||
import com.lagradost.cloudstream3.ui.account.AccountAdapter.Companion.VIEW_TYPE_EDIT_ACCOUNT
|
||||
import com.lagradost.cloudstream3.ui.account.AccountAdapter.Companion.VIEW_TYPE_SELECT_ACCOUNT
|
||||
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSettings
|
||||
import com.lagradost.cloudstream3.utils.DataStoreHelper.getAccounts
|
||||
import com.lagradost.cloudstream3.utils.DataStoreHelper.accounts
|
||||
import com.lagradost.cloudstream3.utils.DataStoreHelper.setAccount
|
||||
import com.lagradost.cloudstream3.utils.UIHelper.colorFromAttribute
|
||||
|
||||
|
@ -33,8 +33,6 @@ class AccountSelectActivity : AppCompatActivity() {
|
|||
false
|
||||
)
|
||||
|
||||
val accounts = getAccounts(this@AccountSelectActivity)
|
||||
|
||||
val skipStartup = getKey(
|
||||
getString(R.string.skip_startup_account_select_key),
|
||||
false
|
||||
|
|
|
@ -14,7 +14,6 @@ class AccountViewModel : ViewModel() {
|
|||
private val _accounts: MutableLiveData<List<DataStoreHelper.Account>> = MutableLiveData(
|
||||
context?.let { getAccounts(it) } ?: DataStoreHelper.accounts.toList()
|
||||
)
|
||||
|
||||
val accounts: LiveData<List<DataStoreHelper.Account>> = _accounts
|
||||
|
||||
private val _isEditing = MutableLiveData(false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue