mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 04:07:57 -06:00
fix: Enable logging in production
This commit is contained in:
@@ -22,7 +22,11 @@ class DocumentEditCubit extends Cubit<DocumentEditState> {
|
||||
required DocumentModel document,
|
||||
}) : _initialDocument = document,
|
||||
super(DocumentEditState(document: document)) {
|
||||
_notifier.addListener(this, onUpdated: replace);
|
||||
_notifier.addListener(this, onUpdated: (doc) {
|
||||
if (doc.id == document.id) {
|
||||
emit(state.copyWith(document: doc));
|
||||
}
|
||||
});
|
||||
_labelRepository.addListener(
|
||||
this,
|
||||
onChanged: (labels) {
|
||||
@@ -69,10 +73,6 @@ class DocumentEditCubit extends Cubit<DocumentEditState> {
|
||||
emit(state.copyWith(suggestions: suggestions));
|
||||
}
|
||||
|
||||
void replace(DocumentModel document) {
|
||||
emit(state.copyWith(document: document));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> close() {
|
||||
_notifier.removeListener(this);
|
||||
|
||||
Reference in New Issue
Block a user