feat:Update search

This commit is contained in:
Anton Stubenbord
2023-05-18 18:23:47 +02:00
parent 062c46ccd3
commit c9a6bc64b8
21 changed files with 385 additions and 210 deletions

View File

@@ -7,18 +7,12 @@ enum SearchView {
@JsonSerializable(ignoreUnannotated: true)
class DocumentSearchState extends DocumentPagingState {
@JsonKey()
final List<String> searchHistory;
final SearchView view;
final List<String> suggestions;
@JsonKey()
final ViewType viewType;
final Map<int, Correspondent> correspondents;
final Map<int, DocumentType> documentTypes;
final Map<int, Tag> tags;
final Map<int, StoragePath> storagePaths;
const DocumentSearchState({
this.view = SearchView.suggestions,
this.searchHistory = const [],
@@ -28,10 +22,6 @@ class DocumentSearchState extends DocumentPagingState {
super.hasLoaded,
super.isLoading,
super.value,
this.correspondents = const {},
this.documentTypes = const {},
this.tags = const {},
this.storagePaths = const {},
});
@override
@@ -41,10 +31,6 @@ class DocumentSearchState extends DocumentPagingState {
suggestions,
view,
viewType,
correspondents,
documentTypes,
tags,
storagePaths,
];
@override
@@ -85,10 +71,6 @@ class DocumentSearchState extends DocumentPagingState {
view: view ?? this.view,
suggestions: suggestions ?? this.suggestions,
viewType: viewType ?? this.viewType,
correspondents: correspondents ?? this.correspondents,
documentTypes: documentTypes ?? this.documentTypes,
tags: tags ?? this.tags,
storagePaths: storagePaths ?? this.storagePaths,
);
}