Adds stable to the desktop account manager

This commit is contained in:
Vitor Pamplona
2026-01-01 12:37:54 -05:00
parent 9d67d5d6dc
commit 45df452a38
@@ -20,6 +20,7 @@
*/ */
package com.vitorpamplona.amethyst.commons.account package com.vitorpamplona.amethyst.commons.account
import androidx.compose.runtime.Stable
import com.vitorpamplona.quartz.nip01Core.core.hexToByteArray import com.vitorpamplona.quartz.nip01Core.core.hexToByteArray
import com.vitorpamplona.quartz.nip01Core.core.toHexKey import com.vitorpamplona.quartz.nip01Core.core.toHexKey
import com.vitorpamplona.quartz.nip01Core.crypto.KeyPair import com.vitorpamplona.quartz.nip01Core.crypto.KeyPair
@@ -45,6 +46,7 @@ sealed class AccountState {
) : AccountState() ) : AccountState()
} }
@Stable
class AccountManager { class AccountManager {
private val _accountState = MutableStateFlow<AccountState>(AccountState.LoggedOut) private val _accountState = MutableStateFlow<AccountState>(AccountState.LoggedOut)
val accountState: StateFlow<AccountState> = _accountState.asStateFlow() val accountState: StateFlow<AccountState> = _accountState.asStateFlow()