mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 14:07:59 -06:00
Add migration scripts, remove dependencies to codegen, and cleanups
This commit is contained in:
@@ -12,10 +12,9 @@ import 'package:paperless_mobile/features/paged_document_view/cubit/document_pag
|
||||
import 'package:paperless_mobile/features/paged_document_view/cubit/paged_documents_state.dart';
|
||||
import 'package:paperless_mobile/features/settings/model/view_type.dart';
|
||||
|
||||
part 'documents_cubit.g.dart';
|
||||
part 'documents_state.dart';
|
||||
|
||||
class DocumentsCubit extends HydratedCubit<DocumentsState>
|
||||
class DocumentsCubit extends Cubit<DocumentsState>
|
||||
with DocumentPagingBlocMixin {
|
||||
@override
|
||||
final PaperlessDocumentsApi api;
|
||||
@@ -135,13 +134,13 @@ class DocumentsCubit extends HydratedCubit<DocumentsState>
|
||||
await _userState.save();
|
||||
}
|
||||
|
||||
@override
|
||||
DocumentsState? fromJson(Map<String, dynamic> json) {
|
||||
return DocumentsState.fromJson(json);
|
||||
}
|
||||
// @override
|
||||
// DocumentsState? fromJson(Map<String, dynamic> json) {
|
||||
// return DocumentsState.fromJson(json);
|
||||
// }
|
||||
|
||||
@override
|
||||
Map<String, dynamic>? toJson(DocumentsState state) {
|
||||
return state.toJson();
|
||||
}
|
||||
// @override
|
||||
// Map<String, dynamic>? toJson(DocumentsState state) {
|
||||
// return state.toJson();
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
part of 'documents_cubit.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class DocumentsState extends DocumentPagingState {
|
||||
@JsonKey(includeToJson: false, includeFromJson: false)
|
||||
final List<DocumentModel> selection;
|
||||
|
||||
@JsonKey(includeToJson: false, includeFromJson: false)
|
||||
final Map<int, Correspondent> correspondents;
|
||||
@JsonKey(includeToJson: false, includeFromJson: false)
|
||||
final Map<int, DocumentType> documentTypes;
|
||||
@JsonKey(includeToJson: false, includeFromJson: false)
|
||||
final Map<int, Tag> tags;
|
||||
@JsonKey(includeToJson: false, includeFromJson: false)
|
||||
final Map<int, StoragePath> storagePaths;
|
||||
|
||||
final ViewType viewType;
|
||||
@@ -85,9 +78,4 @@ class DocumentsState extends DocumentPagingState {
|
||||
value: value,
|
||||
);
|
||||
}
|
||||
|
||||
factory DocumentsState.fromJson(Map<String, dynamic> json) =>
|
||||
_$DocumentsStateFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DocumentsStateToJson(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user