This commit is contained in:
Faris Armoush
2025-04-21 10:03:02 +03:00
parent e45f57ca03
commit 065bd33511

View File

@ -136,6 +136,17 @@ class _SidebarWidgetState extends State<SidebarWidget> {
} }
Widget _buildCommunityTile(BuildContext context, CommunityModel community) { Widget _buildCommunityTile(BuildContext context, CommunityModel community) {
final spaces = community.spaces
.where(
(space) =>
{
SpaceStatus.deleted,
SpaceStatus.parentDeleted,
}.contains(space.status) ==
false,
)
.map((space) => _buildSpaceTile(space: space, community: community))
.toList();
return CommunityTile( return CommunityTile(
title: community.name, title: community.name,
key: ValueKey(community.uuid), key: ValueKey(community.uuid),
@ -154,15 +165,7 @@ class _SidebarWidgetState extends State<SidebarWidget> {
); );
}, },
onExpansionChanged: (title, expanded) {}, onExpansionChanged: (title, expanded) {},
children: community.spaces children: spaces,
.where(
(space) => {
SpaceStatus.deleted,
SpaceStatus.parentDeleted,
}.contains(space.status),
)
.map((space) => _buildSpaceTile(space: space, community: community))
.toList(),
); );
} }