diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/nwc/NwcPaymentHandler.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/nwc/NwcPaymentHandler.kt index 7171e85b40..f21c341df8 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/nwc/NwcPaymentHandler.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/nwc/NwcPaymentHandler.kt @@ -322,7 +322,6 @@ class NwcPaymentHandler( subId = subId, filters = listOf(filter), onEvent = { event, _ -> - println("NWC rpc event received: kind=${event.kind} id=${event.id.take(8)} from=${event.pubKey.take(8)}") if (event is LnZapPaymentResponseEvent && event.requestId() == requestId) { @OptIn(kotlinx.coroutines.DelicateCoroutinesApi::class) kotlinx.coroutines.GlobalScope.launch(kotlinx.coroutines.Dispatchers.IO) { diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/FeedScreen.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/FeedScreen.kt index c7cd0ea925..744762c5af 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/FeedScreen.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/FeedScreen.kt @@ -409,6 +409,14 @@ fun FeedScreen( onDispose { viewModel.destroy() } } + // Rescan cache when followedUsers populates (fixes cold-boot race where + // the initial scan runs before the contact list arrives from relays) + LaunchedEffect(viewModel, followedUsers) { + if (feedMode == FeedMode.FOLLOWING && followedUsers.isNotEmpty()) { + viewModel.feedState.refreshSuspended() + } + } + val feedState by viewModel.feedState.feedContent.collectAsState() // Viewport-aware metadata loading: only fetch for visible notes + buffer