AccountState
@Immutable
Constructors
Link copied to clipboard
constructor(lastLoginKeyIndex: Int = 0, canEditAccount: Boolean = false, accounts: SearchableData<Int, DataStoreHelper.Account> = SearchableData.from(
data = persistentMapOf(),
/** This will cause bugs if changed! */
sortedBy = sortByInt { it.keyIndex }
), editAccount: DataStoreHelper.Account? = null, loggedInWith: Int? = null)
Properties
Link copied to clipboard
keyIndex -> DataStoreHelper.Account sorted by keyIndex as keyIndex is unique and in add order
Link copied to clipboard
Is currently open to editing
Link copied to clipboard
We are currectly editing this account with this value, it may be an existing/new account non-null = editing, null = not editing
Link copied to clipboard
Mostly used for focus stuff on TV
Link copied to clipboard
We are currently logged in with this account, we use state instead of effect to prevent bugs