From 7c581edddc2014327fcbbaddada3c162be63ba9f Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 9 Jul 2026 20:56:15 +0000 Subject: [PATCH] fix: render the NIP-29 empty-group placeholder row instead of a blank MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Messages placeholder guard in ChatroomHeaderCompose only recognized Marmot placeholders, so a just-joined NIP-29 relay group (an event-less placeholder note carrying a RelayGroupChannel gatherer) fell through to the wait-for-event branch and rendered BlankNote() — a white gap where the group row should be. Recognize a RelayGroupChannel gatherer too so it routes to the group row renderer. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01B5MLY4hq5LXJ2D5WeLRyXj --- .../screen/loggedIn/chats/rooms/ChatroomHeaderCompose.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/ChatroomHeaderCompose.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/ChatroomHeaderCompose.kt index 5c4c86b7e8..00d765abfe 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/ChatroomHeaderCompose.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/chats/rooms/ChatroomHeaderCompose.kt @@ -105,11 +105,14 @@ fun ChatroomHeaderCompose( accountViewModel: AccountViewModel, nav: INav, ) { - val isEmptyMarmotPlaceholder = + // A joined Marmot or NIP-29 relay group with no messages yet is represented by an event-less + // placeholder note carrying its channel as a gatherer. Render it as the group row (via the + // gatherer) instead of waiting for an event that never arrives, which would blank the row. + val isEmptyGroupPlaceholder = baseNote.event == null && - baseNote.inGatherers?.any { it is MarmotGroupChatroom } == true + baseNote.inGatherers?.any { it is MarmotGroupChatroom || it is RelayGroupChannel } == true - if (baseNote.event != null || isEmptyMarmotPlaceholder) { + if (baseNote.event != null || isEmptyGroupPlaceholder) { ChatroomComposeChannelOrUser(baseNote, accountViewModel, nav) } else { val hasEvent by observeNoteHasEvent(baseNote, accountViewModel)