mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 14:07:59 -06:00
fix: Update sorting of similar documents
This commit is contained in:
@@ -31,9 +31,11 @@ class SimilarDocumentsCubit extends Cubit<SimilarDocumentsState>
|
|||||||
Future<void> initialize() async {
|
Future<void> initialize() async {
|
||||||
if (!state.hasLoaded) {
|
if (!state.hasLoaded) {
|
||||||
await updateFilter(
|
await updateFilter(
|
||||||
filter: state.filter.copyWith(moreLike: () => documentId),
|
filter: state.filter.copyWith(
|
||||||
|
moreLike: () => documentId,
|
||||||
|
sortField: SortField.score,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
emit(state.copyWith(hasLoaded: true));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ enum SortField {
|
|||||||
documentType("document_type__name"),
|
documentType("document_type__name"),
|
||||||
created("created"),
|
created("created"),
|
||||||
added("added"),
|
added("added"),
|
||||||
modified("modified");
|
modified("modified"),
|
||||||
|
score("score");
|
||||||
|
|
||||||
final String queryString;
|
final String queryString;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user