append space id to list

This commit is contained in:
hannathkadher
2025-03-14 14:10:03 +04:00
parent 5b2822f973
commit a5a37f3841
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; List<CommunityModel> list = state.isSearching ? state.filteredCommunity : state.communityList;
return Container( return Container(
height: MediaQuery.sizeOf(context).height, height: MediaQuery.sizeOf(context).height,
color: ColorsManager.whiteColors, decoration: widget.isSide == true
decoration: widget.isSide == true ? subSectionContainerDecoration : null, ? subSectionContainerDecoration.copyWith(color: ColorsManager.whiteColors)
: const BoxDecoration(color: ColorsManager.whiteColors),
child: state is SpaceTreeLoadingState child: state is SpaceTreeLoadingState
? const Center(child: CircularProgressIndicator()) ? const Center(child: CircularProgressIndicator())
: Column( : Column(

View File

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