From c1aef0e1511f17bb84dc2486702ca9305dbff062 Mon Sep 17 00:00:00 2001 From: Micah Morrison Date: Tue, 18 Feb 2025 14:43:05 -0500 Subject: [PATCH] Fix profile modal not closing after switching accounts --- lib/account/widgets/profile_modal_body.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/account/widgets/profile_modal_body.dart b/lib/account/widgets/profile_modal_body.dart index f3f2dc7ac..d8f4cd1b1 100644 --- a/lib/account/widgets/profile_modal_body.dart +++ b/lib/account/widgets/profile_modal_body.dart @@ -252,7 +252,7 @@ class _ProfileSelectState extends State { ? null : () { context.read().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( @@ -508,7 +508,7 @@ class _ProfileSelectState extends State { context.read().add(const LogOutOfAllAccounts()); context.read().add(OnSetCurrentAnonymousInstance(anonymousInstances![index].anonymousInstance.instance)); context.read().add(InstanceChanged(instance: anonymousInstances![index].anonymousInstance.instance)); - Navigator.of(context).pop(); + Navigator.of(context, rootNavigator: true).pop(); }, borderRadius: BorderRadius.circular(50), child: AnimatedSize(