fix: render the NIP-29 empty-group placeholder row instead of a blank

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5MLY4hq5LXJ2D5WeLRyXj
This commit is contained in:
Claude
2026-07-09 20:56:15 +00:00
parent b935995fe6
commit 7c581edddc
@@ -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)