mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
fixed block flow
This commit is contained in:
@ -239,11 +239,15 @@ class SpaceManagementBloc
|
|||||||
SelectCommunityEvent event,
|
SelectCommunityEvent event,
|
||||||
Emitter<SpaceManagementState> emit,
|
Emitter<SpaceManagementState> emit,
|
||||||
) async {
|
) async {
|
||||||
_handleCommunitySpaceStateUpdate(
|
try {
|
||||||
emit: emit,
|
_handleCommunitySpaceStateUpdate(
|
||||||
selectedCommunity: event.selectedCommunity,
|
emit: emit,
|
||||||
selectedSpace: null,
|
selectedCommunity: event.selectedCommunity,
|
||||||
);
|
selectedSpace: null,
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
emit(SpaceManagementError('Error updating state: $e'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onSelectSpace(
|
void _onSelectSpace(
|
||||||
@ -267,7 +271,8 @@ class SpaceManagementBloc
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (previousState is SpaceManagementLoaded ||
|
if (previousState is SpaceManagementLoaded ||
|
||||||
previousState is BlankState) {
|
previousState is BlankState ||
|
||||||
|
previousState is SpaceModelLoaded) {
|
||||||
final communities = List<CommunityModel>.from(
|
final communities = List<CommunityModel>.from(
|
||||||
(previousState as dynamic).communities,
|
(previousState as dynamic).communities,
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user