feat(Label): Use capability-aware label availability in websocket injection.

This commit is contained in:
dab246
2026-03-03 15:23:57 +07:00
committed by Dat H. Pham
parent 2e6e1fcdc8
commit b2338a1160
7 changed files with 33 additions and 25 deletions
@@ -404,7 +404,8 @@ void main() {
when(emailReceiveManager.pendingSharedFileInfo).thenAnswer((_) => BehaviorSubject.seeded([]));
when(downloadController.downloadUIAction).thenAnswer((_) => Rxn(DownloadUIAction.idle));
when(labelController.isLabelSettingEnabled).thenAnswer((_) => RxBool(false));
final isLabelSettingEnabled = RxBool(false);
when(labelController.isLabelSettingEnabled).thenReturn(isLabelSettingEnabled);
Get.put(mailboxDashboardController);
mailboxDashboardController.onReady();
@@ -452,7 +453,8 @@ void main() {
when(context.owner).thenReturn(BuildOwner(focusManager: FocusManager()));
when(context.mounted).thenReturn(true);
when(downloadController.downloadUIAction).thenAnswer((_) => Rxn(DownloadUIAction.idle));
when(labelController.isLabelSettingEnabled).thenAnswer((_) => RxBool(false));
final isLabelSettingEnabled = RxBool(false);
when(labelController.isLabelSettingEnabled).thenReturn(isLabelSettingEnabled);
// expect query in search controller update as expected
mailboxDashboardController.searchEmailByQueryString(queryString);
@@ -637,7 +639,8 @@ void main() {
when(emailReceiveManager.pendingSharedFileInfo).thenAnswer((_) => BehaviorSubject.seeded([]));
when(downloadController.downloadUIAction).thenAnswer((_) => Rxn(DownloadUIAction.idle));
when(labelController.isLabelSettingEnabled).thenAnswer((_) => RxBool(false));
final isLabelSettingEnabled = RxBool(false);
when(labelController.isLabelSettingEnabled).thenReturn(isLabelSettingEnabled);
Get.put(mailboxDashboardController);
mailboxDashboardController.onReady();
@@ -365,7 +365,8 @@ void main() {
when(emailReceiveManager.pendingSharedFileInfo).thenAnswer((_) => BehaviorSubject.seeded([]));
when(downloadController.downloadUIAction).thenAnswer((_) => Rxn(DownloadUIAction.idle));
when(labelController.isLabelSettingEnabled).thenAnswer((_) => RxBool(false));
final isLabelSettingEnabled = RxBool(false);
when(labelController.isLabelSettingEnabled).thenReturn(isLabelSettingEnabled);
searchController = SearchController(
quickSearchEmailInteractor,
@@ -394,7 +394,8 @@ void main() {
when(emailReceiveManager.pendingSharedFileInfo).thenAnswer((_) => BehaviorSubject.seeded([]));
when(downloadController.downloadUIAction).thenAnswer((_) => Rxn(DownloadUIAction.idle));
when(labelController.isLabelSettingEnabled).thenAnswer((_) => RxBool(false));
final isLabelSettingEnabled = RxBool(false);
when(labelController.isLabelSettingEnabled).thenReturn(isLabelSettingEnabled);
Get.put<MailboxDashBoardController>(mailboxDashboardController);