chore: improve handling of loading states (#26)

Reviewed-on: https://git.reya.su/reya/coop-mobile/pulls/26
This commit is contained in:
2026-06-26 09:23:03 +00:00
parent 010a8b4060
commit 25ba03562a
5 changed files with 119 additions and 86 deletions
@@ -65,8 +65,10 @@ class NostrForegroundService : Service() {
} catch (e: Exception) {
throw IllegalStateException("Failed to initialize Nostr Client", e)
}
// Connect to bootstrap relays
nostr.connectBootstrapRelays()
// Handle notifications
nostr.handleNotifications(
onMetadataUpdate = { pubkey, metadata ->
@@ -75,9 +77,6 @@ class NostrForegroundService : Service() {
onContactListUpdate = { contacts ->
serviceScope.launch { nostr.emitContactListUpdate(contacts) }
},
onSubscriptionClose = {
serviceScope.launch { nostr.emitSubscriptionClosed() }
},
onNewMessage = { event ->
serviceScope.launch {
if (!isUserInApp()) {