fix: correct test failures and error propagation

- Add CacheScope provider in UserProfileCacheRepository tests
- Remove catch blocks that swallowed errors in _loadHistory/_loadMoreHistory
- Errors now properly propagate to switchUser() caller
This commit is contained in:
qzl
2026-04-01 15:11:49 +08:00
parent 640b4d15a3
commit 19aa33a609
9 changed files with 7 additions and 48 deletions
@@ -21,10 +21,6 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
final refreshToken = await _repository.getRefreshToken();
if (refreshToken != null) {
final response = await _repository.refreshSession(refreshToken);
_logger.info(
message: 'Session refreshed successfully',
extra: {'user_id': response.user.id},
);
emit(
AuthAuthenticated(
user: AuthUser(id: response.user.id, phone: response.user.phone),