From d19f7b6d3896e39cd906c08bd7eb4358df661f70 Mon Sep 17 00:00:00 2001
From: OmarHatem <omarh.ismail1@gmail.com>
Date: Mon, 5 Dec 2022 18:40:53 +0200
Subject: [PATCH] Remove unused state 'denied' from authentication state [skip
 ci]

---
 lib/reactions/on_authentication_state_change.dart | 5 -----
 lib/store/authentication_store.dart               | 5 +----
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/lib/reactions/on_authentication_state_change.dart b/lib/reactions/on_authentication_state_change.dart
index c91f5277e..edadf33b0 100644
--- a/lib/reactions/on_authentication_state_change.dart
+++ b/lib/reactions/on_authentication_state_change.dart
@@ -26,10 +26,5 @@ void startAuthenticationStateChange(AuthenticationStore authenticationStore,
       await navigatorKey.currentState!.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false);
       return;
     }
-
-    if (state == AuthenticationState.denied) {
-      await navigatorKey.currentState!.pushNamedAndRemoveUntil(Routes.welcome, (_) => false);
-      return;
-    }
   });
 }
diff --git a/lib/store/authentication_store.dart b/lib/store/authentication_store.dart
index 626ca2a91..b734d7acb 100644
--- a/lib/store/authentication_store.dart
+++ b/lib/store/authentication_store.dart
@@ -4,7 +4,7 @@ part 'authentication_store.g.dart';
 
 class AuthenticationStore = AuthenticationStoreBase with _$AuthenticationStore;
 
-enum AuthenticationState { uninitialized, installed, allowed, denied }
+enum AuthenticationState { uninitialized, installed, allowed }
 
 abstract class AuthenticationStoreBase with Store {
   AuthenticationStoreBase() : state = AuthenticationState.uninitialized;
@@ -17,7 +17,4 @@ abstract class AuthenticationStoreBase with Store {
 
   @action
   void allowed() => state = AuthenticationState.allowed;
-
-  @action
-  void denied() => state = AuthenticationState.denied;
 }