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

@@ -13,7 +13,7 @@ class EditLabelCubit extends Cubit<EditLabelState> with LabelCubitMixin {
final LabelRepository labelRepository;
EditLabelCubit(this.labelRepository) : super(const EditLabelState()) {
labelRepository.subscribe(
labelRepository.addListener(
this,
onChanged: (labels) => state.copyWith(
correspondents: labels.correspondents,
@@ -26,7 +26,7 @@ class EditLabelCubit extends Cubit<EditLabelState> with LabelCubitMixin {
@override
Future<void> close() {
labelRepository.unsubscribe(this);
labelRepository.removeListener(this);
return super.close();
}