From 370549072e14a405e2a82b88a3b854991a571753 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 22 Jul 2026 15:57:21 -0400 Subject: [PATCH] make logout properly pop all settings on mobile --- lib/controllers/settings_sections.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/controllers/settings_sections.dart b/lib/controllers/settings_sections.dart index c82947d..7c9796b 100644 --- a/lib/controllers/settings_sections.dart +++ b/lib/controllers/settings_sections.dart @@ -106,10 +106,15 @@ class SettingsSectionsController final colorScheme = Theme.of(context).colorScheme; return M3EButton.icon( onPressed: () async { + Navigator.of( + context, + ).popUntil((route) => route.isFirst); + + await WidgetsBinding.instance.endOfFrame; + await ref .watch(ClientController.provider.notifier) .logout(); - if (context.mounted) Navigator.of(context).pop(); }, label: Text(title), icon: Icon(icon),