mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 20:07:51 -06:00
fix: Add custom fields, translations, add app logs to login routes
This commit is contained in:
@@ -19,28 +19,13 @@ class LinkedDocumentsCubit extends HydratedCubit<LinkedDocumentsState>
|
||||
final ConnectivityStatusService connectivityStatusService;
|
||||
@override
|
||||
final DocumentChangedNotifier notifier;
|
||||
|
||||
final LabelRepository _labelRepository;
|
||||
|
||||
LinkedDocumentsCubit(
|
||||
DocumentFilter filter,
|
||||
this.api,
|
||||
this.notifier,
|
||||
this._labelRepository,
|
||||
this.connectivityStatusService,
|
||||
) : super(LinkedDocumentsState(filter: filter)) {
|
||||
updateFilter(filter: filter);
|
||||
_labelRepository.addListener(
|
||||
this,
|
||||
onChanged: (labels) {
|
||||
emit(state.copyWith(
|
||||
correspondents: labels.correspondents,
|
||||
documentTypes: labels.documentTypes,
|
||||
tags: labels.tags,
|
||||
storagePaths: labels.storagePaths,
|
||||
));
|
||||
},
|
||||
);
|
||||
notifier.addListener(
|
||||
this,
|
||||
onUpdated: replace,
|
||||
|
||||
@@ -5,21 +5,12 @@ class LinkedDocumentsState extends DocumentPagingState {
|
||||
@JsonKey()
|
||||
final ViewType viewType;
|
||||
|
||||
final Map<int, Correspondent> correspondents;
|
||||
final Map<int, DocumentType> documentTypes;
|
||||
final Map<int, StoragePath> storagePaths;
|
||||
final Map<int, Tag> tags;
|
||||
|
||||
const LinkedDocumentsState({
|
||||
this.viewType = ViewType.list,
|
||||
super.filter = const DocumentFilter(),
|
||||
super.isLoading,
|
||||
super.hasLoaded,
|
||||
super.value,
|
||||
this.correspondents = const {},
|
||||
this.documentTypes = const {},
|
||||
this.storagePaths = const {},
|
||||
this.tags = const {},
|
||||
});
|
||||
|
||||
LinkedDocumentsState copyWith({
|
||||
@@ -39,10 +30,6 @@ class LinkedDocumentsState extends DocumentPagingState {
|
||||
hasLoaded: hasLoaded ?? this.hasLoaded,
|
||||
value: value ?? this.value,
|
||||
viewType: viewType ?? this.viewType,
|
||||
correspondents: correspondents ?? this.correspondents,
|
||||
documentTypes: documentTypes ?? this.documentTypes,
|
||||
storagePaths: storagePaths ?? this.storagePaths,
|
||||
tags: tags ?? this.tags,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,10 +51,6 @@ class LinkedDocumentsState extends DocumentPagingState {
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
viewType,
|
||||
correspondents,
|
||||
documentTypes,
|
||||
tags,
|
||||
storagePaths,
|
||||
...super.props,
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user