fix: occasional splash screen hang (#15)

Reviewed-on: https://git.reya.su/reya/coop-mobile/pulls/15
This commit is contained in:
2026-06-06 07:30:47 +00:00
parent b8b3b83952
commit 74a37320fe
2 changed files with 23 additions and 5 deletions
@@ -76,6 +76,11 @@ class NostrViewModel(
private val seenPublicKeys = mutableSetOf<PublicKey>()
init {
// Skip the splash screen if a user is already logged in
if (nostr.signer.currentUser != null) {
_signerRequired.value = false
}
// Check if the notification banner has been dismissed
checkNotificationBannerDismissedStatus()
@@ -216,7 +221,9 @@ class NostrViewModel(
private fun login() {
viewModelScope.launch {
try {
val secret = secretStore.get("user_signer")
val secret = withTimeoutOrNull(3.seconds) {
secretStore.get("user_signer")
}
if (secret == null) {
_signerRequired.value = true