From 50b8c5d35bd64430fc8eecd5bbe9214a7bc12f8b Mon Sep 17 00:00:00 2001 From: dab246 Date: Thu, 24 Mar 2022 16:57:24 +0700 Subject: [PATCH] TF-393 Fix threadView auto scroll up to the top after reading email --- lib/features/thread/presentation/thread_controller.dart | 1 + lib/features/thread/presentation/thread_view.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/features/thread/presentation/thread_controller.dart b/lib/features/thread/presentation/thread_controller.dart index 0101d685e..91274c357 100644 --- a/lib/features/thread/presentation/thread_controller.dart +++ b/lib/features/thread/presentation/thread_controller.dart @@ -232,6 +232,7 @@ class ThreadController extends BaseController { canLoadMore = true; disableSearch(); cancelSelectEmail(); + listEmailController.animateTo(0, duration: Duration(milliseconds: 500), curve: Curves.fastOutSlowIn); mailboxDashBoardController.dispatchRoute(AppRoutes.THREAD); } diff --git a/lib/features/thread/presentation/thread_view.dart b/lib/features/thread/presentation/thread_view.dart index 93e72061d..29207b68c 100644 --- a/lib/features/thread/presentation/thread_view.dart +++ b/lib/features/thread/presentation/thread_view.dart @@ -559,7 +559,7 @@ class ThreadView extends GetWidget with UserSettingPopupMenuMi child: ListView.builder( controller: controller.listEmailController, physics: AlwaysScrollableScrollPhysics(), - key: Key('presentation_email_list'), + key: PageStorageKey('list_presentation_email_in_threads'), itemCount: listPresentationEmail.length, itemBuilder: (context, index) => Obx(() => (EmailTileBuilder( context,