Merge pull request #119 from SyncrowIOT/SP-1327

append space id to list
This commit is contained in:
hannathkadher
2025-03-17 09:33:28 +04:00
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

@ -37,8 +37,9 @@ class _SpaceTreeViewState extends State<SpaceTreeView> {
List<CommunityModel> list = state.isSearching ? state.filteredCommunity : state.communityList;
return Container(
height: MediaQuery.sizeOf(context).height,
color: ColorsManager.whiteColors,
decoration: widget.isSide == true ? subSectionContainerDecoration : null,
decoration: widget.isSide == true
? subSectionContainerDecoration.copyWith(color: ColorsManager.whiteColors)
: const BoxDecoration(color: ColorsManager.whiteColors),
child: state is SpaceTreeLoadingState
? const Center(child: CircularProgressIndicator())
: Column(

View File

@ -28,10 +28,11 @@ class LinkSpaceToModelBloc
try {
BuildContext context = NavigationService.navigatorKey.currentContext!;
var spaceBloc = context.read<SpaceTreeBloc>();
spacesListIds.clear();
for (var communityId in spaceBloc.state.selectedCommunities) {
List<String> spacesList =
spaceBloc.state.selectedCommunityAndSpaces[communityId] ?? [];
spacesListIds = spacesList;
spacesListIds.addAll(spacesList);
}
hasSelectedSpaces =
spaceBloc.state.selectedCommunities.any((communityId) {