TF-4171 Add datasource/repository/interactor for get all labels

This commit is contained in:
dab246
2025-11-25 00:11:16 +07:00
committed by Dat H. Pham
parent 4af0ee1086
commit f4302e06e8
15 changed files with 250 additions and 0 deletions
@@ -84,6 +84,7 @@ import 'package:tmail_ui_user/features/home/domain/state/auto_sign_in_via_deep_l
import 'package:tmail_ui_user/features/home/domain/usecases/store_session_interactor.dart';
import 'package:tmail_ui_user/features/identity_creator/domain/state/get_identity_cache_on_web_state.dart';
import 'package:tmail_ui_user/features/identity_creator/domain/usecase/get_identity_cache_on_web_interactor.dart';
import 'package:tmail_ui_user/features/labels/presentation/label_controller.dart';
import 'package:tmail_ui_user/features/login/domain/exceptions/logout_exception.dart';
import 'package:tmail_ui_user/features/login/domain/state/get_authentication_info_state.dart';
import 'package:tmail_ui_user/features/login/domain/state/get_stored_oidc_configuration_state.dart';
@@ -233,6 +234,7 @@ class MailboxDashBoardController extends ReloadableController
final AppGridDashboardController appGridDashboardController = Get.find<AppGridDashboardController>();
final SpamReportController spamReportController = Get.find<SpamReportController>();
final NetworkConnectionController networkConnectionController = Get.find<NetworkConnectionController>();
final LabelController labelController = Get.find<LabelController>();
final ComposerManager composerManager = Get.find<ComposerManager>();
final getAuthenticationInfoInteractor =
Get.find<GetAuthenticationInfoInteractor>();
@@ -905,6 +907,14 @@ class MailboxDashBoardController extends ReloadableController
paywallController = PaywallController(
ownEmailAddress: ownEmailAddress.value,
);
final isLabelCapabilitySupported = labelController
.isLabelCapabilitySupported(session, currentAccountId);
if (isLabelCapabilitySupported) {
labelController.injectLabelsBindings();
labelController.getAllLabels(currentAccountId);
}
}
void _handleMailtoURL(MailtoArguments arguments) {