From 4f6b500fa0958c9a20a97d7983779f5fb66a28c6 Mon Sep 17 00:00:00 2001 From: hieubt Date: Thu, 21 Dec 2023 16:55:30 +0700 Subject: [PATCH] TF-2101 Add loading banner to thread view (cherry picked from commit d899c1a3c3a7791f19ee9afaf9d4751567b06e1c) --- .../presentation/mailbox_dashboard_view_web.dart | 6 ++++++ lib/features/thread/presentation/thread_view.dart | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/lib/features/mailbox_dashboard/presentation/mailbox_dashboard_view_web.dart b/lib/features/mailbox_dashboard/presentation/mailbox_dashboard_view_web.dart index 99d4991c61..c2d8d1bed6 100644 --- a/lib/features/mailbox_dashboard/presentation/mailbox_dashboard_view_web.dart +++ b/lib/features/mailbox_dashboard/presentation/mailbox_dashboard_view_web.dart @@ -18,6 +18,7 @@ import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/model/sear import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/model/search/email_sort_order_type.dart'; import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/model/search/quick_search_filter.dart'; import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/widgets/download/download_task_item_widget.dart'; +import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/widgets/recover_deleted_message_loading_banner_widget.dart'; import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/widgets/search_input_form_widget.dart'; import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/widgets/top_bar_thread_selection.dart'; import 'package:tmail_ui_user/features/manage_account/presentation/extensions/vacation_response_extension.dart'; @@ -153,6 +154,11 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView { return const SizedBox.shrink(); } }), + Obx(() => RecoverDeletedMessageLoadingBannerWidget( + viewState: controller.viewStateRestoreDeletedMessage.value, + horizontalLoadingWidget: horizontalLoadingWidget, + responsiveUtils: controller.responsiveUtils, + )), _buildListButtonQuickSearchFilter(context), _buildMarkAsMailboxReadLoading(context), Expanded(child: Obx(() { diff --git a/lib/features/thread/presentation/thread_view.dart b/lib/features/thread/presentation/thread_view.dart index 2c6f8f1f70..9bd49d03e3 100644 --- a/lib/features/thread/presentation/thread_view.dart +++ b/lib/features/thread/presentation/thread_view.dart @@ -13,6 +13,7 @@ import 'package:tmail_ui_user/features/email/presentation/model/composer_argumen import 'package:tmail_ui_user/features/email/presentation/widgets/email_action_cupertino_action_sheet_action_builder.dart'; import 'package:tmail_ui_user/features/mailbox/domain/state/mark_as_mailbox_read_state.dart'; import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/mixin/filter_email_popup_menu_mixin.dart'; +import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/widgets/recover_deleted_message_loading_banner_widget.dart'; import 'package:tmail_ui_user/features/manage_account/presentation/extensions/vacation_response_extension.dart'; import 'package:tmail_ui_user/features/manage_account/presentation/vacation/widgets/vacation_notification_message_widget.dart'; import 'package:tmail_ui_user/features/network_connection/presentation/network_connection_banner_widget.dart'; @@ -136,6 +137,11 @@ class ThreadView extends GetWidget return const SizedBox.shrink(); } }), + Obx(() => RecoverDeletedMessageLoadingBannerWidget( + viewState: controller.mailboxDashBoardController.viewStateRestoreDeletedMessage.value, + horizontalLoadingWidget: horizontalLoadingWidget, + responsiveUtils: controller.responsiveUtils, + )), ], Obx(() { if (controller.mailboxDashBoardController.isEmptyTrashBannerEnabledOnMobile(context)) {