TF-1899 Perform invoke StoreSessionAction in Dashboard
(cherry picked from commit 49b0c28db3b76d6c9da8b5e04deb38cc6427e14c)
This commit is contained in:
+5
-1
@@ -108,6 +108,8 @@ import 'package:tmail_ui_user/features/sending_queue/domain/usecases/get_all_sen
|
||||
import 'package:tmail_ui_user/features/sending_queue/presentation/bindings/sending_queue_bindings.dart';
|
||||
import 'package:tmail_ui_user/features/sending_queue/presentation/bindings/sending_queue_interactor_bindings.dart';
|
||||
import 'package:tmail_ui_user/features/sending_queue/presentation/sending_queue_controller.dart';
|
||||
import 'package:tmail_ui_user/features/session/domain/repository/session_repository.dart';
|
||||
import 'package:tmail_ui_user/features/session/domain/usecases/store_session_interactor.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/datasource/thread_datasource.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/datasource_impl/local_thread_datasource_impl.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/datasource_impl/thread_datasource_impl.dart';
|
||||
@@ -177,7 +179,8 @@ class MailboxDashBoardBindings extends BaseBindings {
|
||||
Get.find<GetEmailByIdInteractor>(),
|
||||
Get.find<SendEmailInteractor>(),
|
||||
Get.find<StoreSendingEmailInteractor>(),
|
||||
Get.find<GetAllSendingEmailInteractor>()
|
||||
Get.find<GetAllSendingEmailInteractor>(),
|
||||
Get.find<StoreSessionInteractor>(),
|
||||
));
|
||||
Get.put(AdvancedFilterController());
|
||||
}
|
||||
@@ -332,6 +335,7 @@ class MailboxDashBoardBindings extends BaseBindings {
|
||||
));
|
||||
Get.lazyPut(() => StoreSendingEmailInteractor(Get.find<EmailRepository>()));
|
||||
SendingQueueInteractorBindings().dependencies();
|
||||
Get.lazyPut(() => StoreSessionInteractor(Get.find<SessionRepository>()));
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
+9
@@ -102,6 +102,7 @@ import 'package:tmail_ui_user/features/push_notification/presentation/notificati
|
||||
import 'package:tmail_ui_user/features/push_notification/presentation/services/fcm_service.dart';
|
||||
import 'package:tmail_ui_user/features/sending_queue/domain/state/get_all_sending_email_state.dart';
|
||||
import 'package:tmail_ui_user/features/sending_queue/domain/usecases/get_all_sending_email_interactor.dart';
|
||||
import 'package:tmail_ui_user/features/session/domain/usecases/store_session_interactor.dart';
|
||||
import 'package:tmail_ui_user/features/thread/domain/constants/thread_constants.dart';
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/filter_message_option.dart';
|
||||
import 'package:tmail_ui_user/features/thread/domain/model/search_query.dart';
|
||||
@@ -156,6 +157,7 @@ class MailboxDashBoardController extends ReloadableController {
|
||||
final SendEmailInteractor _sendEmailInteractor;
|
||||
final StoreSendingEmailInteractor _storeSendingEmailInteractor;
|
||||
final GetAllSendingEmailInteractor _getAllSendingEmailInteractor;
|
||||
final StoreSessionInteractor _storeSessionInteractor;
|
||||
|
||||
GetAllVacationInteractor? _getAllVacationInteractor;
|
||||
UpdateVacationInteractor? _updateVacationInteractor;
|
||||
@@ -227,6 +229,7 @@ class MailboxDashBoardController extends ReloadableController {
|
||||
this._sendEmailInteractor,
|
||||
this._storeSendingEmailInteractor,
|
||||
this._getAllSendingEmailInteractor,
|
||||
this._storeSessionInteractor,
|
||||
) : super(
|
||||
getAuthenticatedAccountInteractor,
|
||||
updateAuthenticationAccountInteractor
|
||||
@@ -447,6 +450,7 @@ class MailboxDashBoardController extends ReloadableController {
|
||||
spamReportController.getSpamReportStateAction();
|
||||
if (PlatformInfo.isMobile) {
|
||||
getAllSendingEmails();
|
||||
_storeSessionAction(sessionCurrent!);
|
||||
}
|
||||
if (!BuildUtils.isWeb && !_notificationManager.isNotificationClickedOnTerminate) {
|
||||
_handleClickLocalNotificationOnTerminated();
|
||||
@@ -1230,6 +1234,7 @@ class MailboxDashBoardController extends ReloadableController {
|
||||
spamReportController.getSpamReportStateAction();
|
||||
if (PlatformInfo.isMobile) {
|
||||
getAllSendingEmails();
|
||||
_storeSessionAction(sessionCurrent!);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1950,6 +1955,10 @@ class MailboxDashBoardController extends ReloadableController {
|
||||
dispatchRoute(DashboardRoutes.thread);
|
||||
dispatchMailboxUIAction(SelectMailboxDefaultAction());
|
||||
}
|
||||
|
||||
void _storeSessionAction(Session session) {
|
||||
consumeState(_storeSessionInteractor.execute(session));
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
|
||||
+6
-5
@@ -1,6 +1,6 @@
|
||||
import 'package:core/core.dart';
|
||||
import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:core/utils/app_logger.dart';
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -25,10 +25,11 @@ void main() async {
|
||||
MainBindings().dependencies(),
|
||||
HiveCacheConfig().setUp(),
|
||||
Executor().warmUp(),
|
||||
if (PlatformInfo.isMobile) ... [
|
||||
WorkManagerConfig().initialize(),
|
||||
LocalNotificationManager.instance.setUp(),
|
||||
],
|
||||
if (PlatformInfo.isMobile)
|
||||
... [
|
||||
WorkManagerConfig().initialize(),
|
||||
LocalNotificationManager.instance.setUp(),
|
||||
],
|
||||
AppUtils.loadEnvFile()
|
||||
]);
|
||||
await HiveCacheConfig.initializeEncryptionKey();
|
||||
|
||||
Reference in New Issue
Block a user