Handle sync correctly

This commit is contained in:
Kgothatso Ngako
2026-03-30 01:22:07 +02:00
parent 7877c29e52
commit 2c240ab91d
2 changed files with 7 additions and 2 deletions

View File

@@ -307,7 +307,12 @@ class NavigationViewModel(
} else if (localProfile.broadcastNostrEventReceipt != null) {
logger.i("We have a broadcast receipt: ${localProfile.profile}")
NavigationUIState.ProfileLoaded(
broadcastNostrEventReceipt = localProfile.broadcastNostrEventReceipt
publicKey = localProfile.unsignedNostrEvent.pubKey
)
} else if (localProfile.unsignedNostrEvent.signedAt != null && localProfile.profile!= null) {
logger.i("We have successfully synced a profile: ${localProfile.profile}")
NavigationUIState.ProfileLoaded(
publicKey = localProfile.unsignedNostrEvent.pubKey
)
} else if (localProfile.broadcastNostrEventRequest != null) {
logger.i("We have a broadcast request: ${localProfile.broadcastNostrEventRequest}")

View File

@@ -41,6 +41,6 @@ abstract class NavigationUIState {
data class ProfileLoaded(
val broadcastNostrEventReceipt: BroadcastNostrEventReceipt
val publicKey: String
) : NavigationUIState()
}