fix: Refactor labels structure

This commit is contained in:
Anton Stubenbord
2023-04-05 19:44:58 +02:00
parent a2388b014b
commit 79ccdd0946
35 changed files with 357 additions and 234 deletions

View File

@@ -12,7 +12,7 @@ class LabelCubit extends Cubit<LabelState> with LabelCubitMixin<LabelState> {
final LabelRepository labelRepository;
LabelCubit(this.labelRepository) : super(const LabelState()) {
labelRepository.subscribe(
labelRepository.addListener(
this,
onChanged: (labels) {
emit(state.copyWith(
@@ -27,7 +27,7 @@ class LabelCubit extends Cubit<LabelState> with LabelCubitMixin<LabelState> {
@override
Future<void> close() {
labelRepository.unsubscribe(this);
labelRepository.removeListener(this);
return super.close();
}