mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-26 17:54:55 +00:00
updated subspace edit flow
This commit is contained in:
@ -408,7 +408,9 @@ class SpaceManagementBloc
|
||||
|
||||
Future<List<SpaceModel>> saveSpacesHierarchically(
|
||||
List<SpaceModel> spaces, String communityUuid) async {
|
||||
print("space");
|
||||
final orderedSpaces = flattenHierarchy(spaces);
|
||||
print("parent");
|
||||
|
||||
final parentsToDelete = orderedSpaces.where((space) =>
|
||||
space.status == SpaceStatus.deleted &&
|
||||
@ -420,9 +422,10 @@ class SpaceManagementBloc
|
||||
await _api.deleteSpace(communityUuid, parent.uuid!);
|
||||
}
|
||||
} catch (e) {
|
||||
rethrow; // Decide whether to stop execution or continue
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
orderedSpaces.removeWhere((space) => parentsToDelete.contains(space));
|
||||
|
||||
for (var space in orderedSpaces) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user