Skip to content

Commit bbcc0ed

Browse files
committed
refactor(authentication): remove unnecessary state reset
- Remove the code that reset the AuthenticationBloc state in the UI layer - Add a comment explaining that the BLoC is responsible for handling its own state - Simplify the EmailLinkFormState by removing unnecessary context read operation
1 parent 16024dd commit bbcc0ed

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/authentication/view/request_code_page.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,8 @@ class _EmailLinkFormState extends State<_EmailLinkForm> {
222222
setState(() {
223223
_cooldownSeconds = 0;
224224
});
225-
// Optionally, trigger an event to reset the bloc state if needed
226-
context
227-
.read<AuthenticationBloc>()
228-
.add(const AuthenticationCooldownCompleted());
225+
// The BLoC handles resetting its own state. The UI timer is only
226+
// responsible for updating the countdown on the screen.
229227
}
230228
});
231229
}

0 commit comments

Comments
 (0)