feat(Label): fix miss inject websocket when label setting not change

This commit is contained in:
dab246
2026-03-03 19:04:31 +07:00
committed by Dat H. Pham
parent b2338a1160
commit 8187040b10
@@ -70,6 +70,7 @@ class LabelController extends BaseController with LabelContextMenuMixin {
consumeState(_getLabelSettingStateInteractor!.execute(accountId)); consumeState(_getLabelSettingStateInteractor!.execute(accountId));
} else { } else {
isLabelSettingEnabled.value = false; isLabelSettingEnabled.value = false;
isLabelSettingEnabled.refresh();
_clearLabelData(); _clearLabelData();
} }
} }
@@ -168,7 +169,7 @@ class LabelController extends BaseController with LabelContextMenuMixin {
void _handleGetLabelSettingStateSuccess(bool isEnabled, AccountId accountId) { void _handleGetLabelSettingStateSuccess(bool isEnabled, AccountId accountId) {
isLabelSettingEnabled.value = isEnabled; isLabelSettingEnabled.value = isEnabled;
isLabelSettingEnabled.refresh();
if (isEnabled) { if (isEnabled) {
injectLabelsBindings(); injectLabelsBindings();
getAllLabels(accountId); getAllLabels(accountId);
@@ -201,6 +202,7 @@ class LabelController extends BaseController with LabelContextMenuMixin {
_handleCreateNewLabelFailure(failure); _handleCreateNewLabelFailure(failure);
} else if (failure is GetLabelSettingStateFailure) { } else if (failure is GetLabelSettingStateFailure) {
isLabelSettingEnabled.value = false; isLabelSettingEnabled.value = false;
isLabelSettingEnabled.refresh();
_clearLabelData(); _clearLabelData();
} else if (failure is EditLabelFailure) { } else if (failure is EditLabelFailure) {
handleEditLabelFailure(failure); handleEditLabelFailure(failure);