mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 02:07:58 -06:00
fix: Refactor labels structure
This commit is contained in:
@@ -32,10 +32,10 @@ class DocumentEditCubit extends Cubit<DocumentEditState> {
|
||||
tags: _labelRepository.state.tags,
|
||||
),
|
||||
) {
|
||||
_notifier.subscribe(this, onUpdated: replace);
|
||||
_labelRepository.subscribe(
|
||||
_notifier.addListener(this, onUpdated: replace);
|
||||
_labelRepository.addListener(
|
||||
this,
|
||||
onStateChanged: (labels) => emit(state.copyWith()),
|
||||
onChanged: (labels) => emit(state.copyWith()),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class DocumentEditCubit extends Cubit<DocumentEditState> {
|
||||
for (final sub in _subscriptions) {
|
||||
sub.cancel();
|
||||
}
|
||||
_notifier.unsubscribe(this);
|
||||
_notifier.removeListener(this);
|
||||
return super.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user