Skip to content

Commit

Permalink
removed unwanted commnets
Browse files Browse the repository at this point in the history
  • Loading branch information
sudo-which-qp committed Dec 24, 2024
1 parent ac3fe29 commit 926fdd9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion lib/presentation/pages/cloud_notes/auth/login_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class _LoginScreenState extends State<LoginScreen> {
bool isLoading = false;
bool isAuthLoading = false;

// Add TextEditingControllers instead of String variables
final TextEditingController _identifierController = TextEditingController();
final TextEditingController _passwordController = TextEditingController();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class _RegisterScreenState extends State<RegisterScreen> {
return BlocListener<AuthCubit, AuthState>(
listener: (context, state) {
if (state is AuthAuthenticated) {
// Get saved route and navigate
final attemptedRoute =
context.read<AuthCubit>().getAndClearAttemptedRoute();
Navigator.pop(context);
Expand Down
2 changes: 0 additions & 2 deletions lib/presentation/pages/cloud_notes/auth/verify_code.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ class _VerifyCodeState extends State<VerifyCode> {
return BlocListener<AuthCubit, AuthState>(
listener: (context, state) {
if (state is AuthAuthenticated) {
// Get attempted route if any
final attemptedRoute = context.read<AuthCubit>().getAndClearAttemptedRoute();
// Navigate to cloud notes after verification
navigateReplaceTo(
context,
destination: attemptedRoute ?? RoutesName.cloud_notes,
Expand Down
3 changes: 0 additions & 3 deletions lib/state/cubits/auth_cubit/auth_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class AuthCubit extends Cubit<AuthState> {
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,));
}
Expand Down Expand Up @@ -102,10 +101,8 @@ class AuthCubit extends Cubit<AuthState> {
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);
}
Expand Down

0 comments on commit 926fdd9

Please sign in to comment.