From ef49db7b9182c51972977aaeac89dc036abd60fd Mon Sep 17 00:00:00 2001 From: dab246 Date: Wed, 7 Jun 2023 11:47:55 +0700 Subject: [PATCH] TF-1899 Clear view state when no network (cherry picked from commit e45c252f690aacc7baf9fda7c381ef43493a2de0) --- lib/features/base/base_controller.dart | 1 - lib/features/thread/presentation/thread_controller.dart | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/features/base/base_controller.dart b/lib/features/base/base_controller.dart index 9ca854535..4c6ab02c9 100644 --- a/lib/features/base/base_controller.dart +++ b/lib/features/base/base_controller.dart @@ -152,7 +152,6 @@ abstract class BaseController extends GetxController void handleExceptionAction(Exception exception) { log('BaseController::handleExceptionAction():exception: $exception'); - clearState(); } void handleFailureViewState(Failure failure) { diff --git a/lib/features/thread/presentation/thread_controller.dart b/lib/features/thread/presentation/thread_controller.dart index dd74f4350..67cc504ef 100644 --- a/lib/features/thread/presentation/thread_controller.dart +++ b/lib/features/thread/presentation/thread_controller.dart @@ -189,6 +189,12 @@ class ThreadController extends BaseController with EmailActionController { _handleErrorGetAllOrRefreshChangesEmail(error, stackTrace); } + @override + void handleExceptionAction(Exception exception) { + super.handleExceptionAction(exception); + clearState(); + } + void _registerObxStreamListener() { ever(mailboxDashBoardController.selectedMailbox, (mailbox) { if (mailbox is PresentationMailbox) {