hide room header when empty

This commit is contained in:
Henry Hiles 2026-11-24 13:05:57 -05:00
commit be69358ea4
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -94,12 +94,15 @@ class const RoomsPane({super.key}) extends ConsumerWidget {
), ),
], ],
), ),
.new( if (selectedSpace.children.isNotEmpty)
header: selectedSpace.room == null .new(
? null header: selectedSpace.room == null
: const DividerWidget(Text("Rooms")), ? null
destinations: selectedSpace.children.toDestinations(isDm: isDm), : const DividerWidget(Text("Rooms")),
), destinations: selectedSpace.children.toDestinations(
isDm: isDm,
),
),
...selectedSpace.subSpaces.map( ...selectedSpace.subSpaces.map(
(subSpace) => NavigationRailM3ESection( (subSpace) => NavigationRailM3ESection(
header: DividerWidget( header: DividerWidget(