Skip to content

Commit

Permalink
Fix profile modal not closing after switching accounts (#1706)
Browse files Browse the repository at this point in the history
  • Loading branch information
micahmo authored Feb 19, 2025
1 parent cf46506 commit a57dec8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/account/widgets/profile_modal_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class _ProfileSelectState extends State<ProfileSelect> {
? null
: () {
context.read<AuthBloc>().add(SwitchAccount(accountId: accounts![index].account.id, reload: widget.reloadOnSave));
Navigator.of(context).pop();
Navigator.of(context, rootNavigator: true).pop();
},
borderRadius: BorderRadius.circular(50),
child: AnimatedSize(
Expand Down Expand Up @@ -508,7 +508,7 @@ class _ProfileSelectState extends State<ProfileSelect> {
context.read<AuthBloc>().add(const LogOutOfAllAccounts());
context.read<ThunderBloc>().add(OnSetCurrentAnonymousInstance(anonymousInstances![index].anonymousInstance.instance));
context.read<AuthBloc>().add(InstanceChanged(instance: anonymousInstances![index].anonymousInstance.instance));
Navigator.of(context).pop();
Navigator.of(context, rootNavigator: true).pop();
},
borderRadius: BorderRadius.circular(50),
child: AnimatedSize(
Expand Down

0 comments on commit a57dec8

Please sign in to comment.