mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 14:08:00 -06:00
Added dependencies which fix crash on android 12L/13, improved list layout in inbox
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'query_type.dart';
|
||||
@@ -5,7 +6,7 @@ import 'query_type.dart';
|
||||
part 'text_query.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class TextQuery {
|
||||
class TextQuery extends Equatable {
|
||||
final QueryType queryType;
|
||||
final String? queryText;
|
||||
|
||||
@@ -61,4 +62,7 @@ class TextQuery {
|
||||
|
||||
factory TextQuery.fromJson(Map<String, dynamic> json) =>
|
||||
_$TextQueryFromJson(json);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [queryType, queryText];
|
||||
}
|
||||
|
||||
@@ -219,12 +219,12 @@ class PaperlessDocumentsApiImpl implements PaperlessDocumentsApi {
|
||||
final response = await client.get(
|
||||
'/api/search/autocomplete/',
|
||||
queryParameters: {
|
||||
'query': query,
|
||||
'term': query,
|
||||
'limit': limit,
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
return response.data as List<String>;
|
||||
return (response.data as List).cast<String>();
|
||||
}
|
||||
throw const PaperlessServerException(ErrorCode.autocompleteQueryError);
|
||||
} on DioError catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user