feat(Label): fix miss inject websocket when label setting not change
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user