Skip to content

Commit 1c922c2

Browse files
committed
refactor(auth): remove unused event handler
- Removed _onAuthenticationUserChanged - Simplified state transition logic
1 parent 3c4251b commit 1c922c2

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

lib/authentication/bloc/authentication_bloc.dart

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class AuthenticationBloc
1818
required HtAuthenticationRepository authenticationRepository,
1919
}) : _authenticationRepository = authenticationRepository,
2020
super(AuthenticationInitial()) {
21-
on<AuthenticationUserChanged>(_onAuthenticationUserChanged);
2221
on<AuthenticationEmailSignInRequested>(
2322
_onAuthenticationEmailSignInRequested,
2423
);
@@ -41,18 +40,6 @@ class AuthenticationBloc
4140
final HtAuthenticationRepository _authenticationRepository;
4241
late final StreamSubscription<User> _userSubscription;
4342

44-
/// Handles [AuthenticationUserChanged] events.
45-
void _onAuthenticationUserChanged(
46-
AuthenticationUserChanged event,
47-
Emitter<AuthenticationState> emit,
48-
) {
49-
if (event.user.isAnonymous) {
50-
emit(AuthenticationUnauthenticated());
51-
} else {
52-
emit(AuthenticationAuthenticated(event.user));
53-
}
54-
}
55-
5643
/// Handles [AuthenticationEmailSignInRequested] events.
5744
Future<void> _onAuthenticationEmailSignInRequested(
5845
AuthenticationEmailSignInRequested event,

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ht_main
22
description: main headlines toolkit mobile app.
3-
version: 0.31.0
3+
version: 0.31.1
44
publish_to: none
55
repository: https://github.com/headlines-toolkit/ht-main
66
environment:

0 commit comments

Comments
 (0)