Refactor organization creation logic for improved readability and maintainability
This commit is contained in:
@@ -147,9 +147,7 @@ class OrganizationBloc extends Bloc<OrganizationEvent, OrganizationState> {
|
||||
try {
|
||||
final newOrg = await orgApi.createOrganization(name);
|
||||
final updatedOrgs = [...existingOrgs, newOrg];
|
||||
emit(
|
||||
OrganizationLoaded(organizations: updatedOrgs, selectedOrg: newOrg),
|
||||
);
|
||||
emit(OrganizationLoaded(organizations: updatedOrgs, selectedOrg: newOrg));
|
||||
// Reset blocs and load permissions for new org
|
||||
permissionBloc.add(PermissionsReset());
|
||||
fileBrowserBloc.add(ResetFileBrowser());
|
||||
|
||||
Reference in New Issue
Block a user