forked from Nexus/nexus
better handle when room is null
This commit is contained in:
parent
3afb4befa5
commit
02b7892fb0
4 changed files with 42 additions and 37 deletions
|
|
@ -39,9 +39,7 @@ class Sidebar extends HookConsumerWidget {
|
|||
(room) => room.metadata?.id == selectedRoomId,
|
||||
);
|
||||
final selectedRoomIndex = indexOfSelectedRoom == -1
|
||||
? selectedSpace.children.isEmpty
|
||||
? null
|
||||
: 0
|
||||
? null
|
||||
: indexOfSelectedRoom;
|
||||
|
||||
return Drawer(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue