Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue with refreshing the feed #1154

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/thunder/pages/thunder_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,11 @@ class _ThunderState extends State<Thunder> {
},
buildWhen: (previous, current) => current.status != AuthStatus.failure && current.status != AuthStatus.loading,
listener: (context, state) {
// Although the buildWhen delegate exlcudes this state,
// there seems to be a timing issue where we can end up here anyway.
// So just return.
if (state.status == AuthStatus.loading) return;

context.read<AccountBloc>().add(RefreshAccountInformation());

// Add a bit of artificial delay to allow preferences to set the proper active profile
Expand Down
Loading