From ab82a91cec48b4a410d42dd112b88874a4f9f766 Mon Sep 17 00:00:00 2001 From: Dat PHAM HOANG Date: Sat, 25 Mar 2023 13:07:17 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=92=EF=B8=8F=20Fix=20Logout=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 5162c145874cdb593aa28617d69f92330fde39d6) --- lib/features/base/base_controller.dart | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/features/base/base_controller.dart b/lib/features/base/base_controller.dart index 9f3d90cbb..330022c0e 100644 --- a/lib/features/base/base_controller.dart +++ b/lib/features/base/base_controller.dart @@ -262,15 +262,15 @@ abstract class BaseController extends GetxController void logout(Session? session, AccountId? accountId) { _isFcmEnabled = fcmEnabled(session, accountId); - if (_isFcmEnabled) { - final authenticationType = authorizationInterceptors.authenticationType; - if (authenticationType == AuthenticationType.oidc) { - consumeState(logoutOidcInteractor.execute()); - } else { - _getSubscriptionLocalAction(); - } + final authenticationType = authorizationInterceptors.authenticationType; + if (authenticationType == AuthenticationType.oidc) { + consumeState(logoutOidcInteractor.execute()); } else { - checkAuthenticationTypeWhenLogout(); + if (_isFcmEnabled) { + _getSubscriptionLocalAction(); + } else { + logoutAction(); + } } } @@ -333,6 +333,5 @@ abstract class BaseController extends GetxController _fcmReceiver.deleteFcmToken(); } await cachingManager.closeHive(); - goToLogin(arguments: LoginArguments(LoginFormType.ssoForm)); } -} \ No newline at end of file +}