From 926fdd90ffa3707019b13b39715c50735ff23bba Mon Sep 17 00:00:00 2001 From: Godsend Joseph Date: Tue, 24 Dec 2024 18:51:17 +0000 Subject: [PATCH] removed unwanted commnets --- lib/presentation/pages/cloud_notes/auth/login_screen.dart | 1 - lib/presentation/pages/cloud_notes/auth/register_screen.dart | 1 - lib/presentation/pages/cloud_notes/auth/verify_code.dart | 2 -- lib/state/cubits/auth_cubit/auth_cubit.dart | 3 --- 4 files changed, 7 deletions(-) diff --git a/lib/presentation/pages/cloud_notes/auth/login_screen.dart b/lib/presentation/pages/cloud_notes/auth/login_screen.dart index 08ad398..1e44fbc 100644 --- a/lib/presentation/pages/cloud_notes/auth/login_screen.dart +++ b/lib/presentation/pages/cloud_notes/auth/login_screen.dart @@ -25,7 +25,6 @@ class _LoginScreenState extends State { bool isLoading = false; bool isAuthLoading = false; - // Add TextEditingControllers instead of String variables final TextEditingController _identifierController = TextEditingController(); final TextEditingController _passwordController = TextEditingController(); diff --git a/lib/presentation/pages/cloud_notes/auth/register_screen.dart b/lib/presentation/pages/cloud_notes/auth/register_screen.dart index 2d43a20..fdc2ad6 100644 --- a/lib/presentation/pages/cloud_notes/auth/register_screen.dart +++ b/lib/presentation/pages/cloud_notes/auth/register_screen.dart @@ -44,7 +44,6 @@ class _RegisterScreenState extends State { return BlocListener( listener: (context, state) { if (state is AuthAuthenticated) { - // Get saved route and navigate final attemptedRoute = context.read().getAndClearAttemptedRoute(); Navigator.pop(context); diff --git a/lib/presentation/pages/cloud_notes/auth/verify_code.dart b/lib/presentation/pages/cloud_notes/auth/verify_code.dart index ed35689..b3dbf9b 100644 --- a/lib/presentation/pages/cloud_notes/auth/verify_code.dart +++ b/lib/presentation/pages/cloud_notes/auth/verify_code.dart @@ -73,9 +73,7 @@ class _VerifyCodeState extends State { return BlocListener( listener: (context, state) { if (state is AuthAuthenticated) { - // Get attempted route if any final attemptedRoute = context.read().getAndClearAttemptedRoute(); - // Navigate to cloud notes after verification navigateReplaceTo( context, destination: attemptedRoute ?? RoutesName.cloud_notes, diff --git a/lib/state/cubits/auth_cubit/auth_cubit.dart b/lib/state/cubits/auth_cubit/auth_cubit.dart index d7849a8..a519d4d 100644 --- a/lib/state/cubits/auth_cubit/auth_cubit.dart +++ b/lib/state/cubits/auth_cubit/auth_cubit.dart @@ -57,7 +57,6 @@ class AuthCubit extends Cubit { logger.i('Handling unverified user in cubit'); final user = _authRepository.getCurrentUser(); if (user != null) { - // Emit both the error message and the unverified state emit(AuthError(e.toString())); emit(AuthEmailUnverified(user,)); } @@ -102,10 +101,8 @@ class AuthCubit extends Cubit { final user = _authRepository.getCurrentUser(); if (user != null) { showSuccess('You have been verified successfully.'); - // Make sure to get attempted route before emitting new state final attemptedRoute = _attemptedRoute; emit(AuthAuthenticated(user)); - // Set attempted route if needed if (attemptedRoute != null) { saveAttemptedRoute(attemptedRoute); }