Render subspace avatars, if available

This commit is contained in:
Henry Hiles 2026-06-06 18:40:32 -04:00
commit d513e466fd
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -62,7 +62,6 @@ class Sidebar extends HookConsumerWidget {
fallback: selectedSpaceId == "dms"
? null
: Icon(Icons.numbers),
// space.client.headers,
),
),
)
@ -220,9 +219,22 @@ class Sidebar extends HookConsumerWidget {
),
for (final subSpace in selectedSpace.subSpaces)
.new(
header: Text(
header: Row(
spacing: 8,
children: [
SizedBox(width: 16, child: Divider()),
if (subSpace.room.metadata?.avatar != null)
AvatarOrHash(
subSpace.room.metadata?.avatar,
subSpace.room.metadata?.name ?? "Unnamed Room",
height: 16,
),
Text(
subSpace.room.metadata?.name ?? "Unnamed Space",
),
Expanded(child: Divider()),
],
),
destinations: roomsToDestinations(subSpace.children),
),
],