subspace sorting

Fixes #183
This commit is contained in:
Henry Hiles 2026-11-25 16:29:09 -05:00
commit 432064e111
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -3,6 +3,10 @@ import "package:nexus/models/room.dart";
import "package:nexus/models/space.dart";
extension GetAllChildRooms on Space {
IList<Room> get allChildRooms =>
children.addAll(subSpaces.expand((s) => s.children));
IList<Room> get allChildRooms => subSpaces
.map((subspace) => subspace.children)
.toIList()
.insert(childrenIndex, children)
.expand((rooms) => rooms)
.toIList();
}