feat: Make label fields less restrictive, improve change detection in document edit page

This commit is contained in:
Anton Stubenbord
2023-10-10 15:27:58 +02:00
parent 0b4b7f6871
commit 379b71008a
25 changed files with 597 additions and 391 deletions

View File

@@ -25,12 +25,19 @@ class DocumentEditCubit extends Cubit<DocumentEditState> {
_notifier.addListener(this, onUpdated: replace);
_labelRepository.addListener(
this,
onChanged: (labels) => emit(state.copyWith(
correspondents: labels.correspondents,
documentTypes: labels.documentTypes,
storagePaths: labels.storagePaths,
tags: labels.tags,
)),
onChanged: (labels) {
if (isClosed) {
return;
}
emit(
state.copyWith(
correspondents: labels.correspondents,
documentTypes: labels.documentTypes,
storagePaths: labels.storagePaths,
tags: labels.tags,
),
);
},
);
}