feat: Replaced old label form fields with full page search, removed badge from edit button in document details

This commit is contained in:
Anton Stubenbord
2023-04-07 18:04:56 +02:00
parent 79ccdd0946
commit 10d48e6a55
58 changed files with 3457 additions and 487 deletions

View File

@@ -23,14 +23,19 @@ class DocumentSearchCubit extends HydratedCubit<DocumentSearchState>
DocumentSearchCubit(this.api, this.notifier, this._labelRepository)
: super(const DocumentSearchState()) {
_labelRepository.addListener(this, onChanged: (labels) {
emit(state.copyWith(
correspondents: labels.correspondents,
documentTypes: labels.documentTypes,
tags: labels.tags,
storagePaths: labels.storagePaths,
));
});
_labelRepository.addListener(
this,
onChanged: (labels) {
emit(
state.copyWith(
correspondents: labels.correspondents,
documentTypes: labels.documentTypes,
tags: labels.tags,
storagePaths: labels.storagePaths,
),
);
},
);
notifier.addListener(
this,
onDeleted: remove,
@@ -101,6 +106,7 @@ class DocumentSearchCubit extends HydratedCubit<DocumentSearchState>
@override
Future<void> close() {
notifier.removeListener(this);
_labelRepository.removeListener(this);
return super.close();
}