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