make logout properly pop all settings on mobile

This commit is contained in:
Henry Hiles 2026-07-22 15:57:21 -04:00
commit 370549072e
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -106,10 +106,15 @@ class SettingsSectionsController
final colorScheme = Theme.of(context).colorScheme; final colorScheme = Theme.of(context).colorScheme;
return M3EButton.icon( return M3EButton.icon(
onPressed: () async { onPressed: () async {
Navigator.of(
context,
).popUntil((route) => route.isFirst);
await WidgetsBinding.instance.endOfFrame;
await ref await ref
.watch(ClientController.provider.notifier) .watch(ClientController.provider.notifier)
.logout(); .logout();
if (context.mounted) Navigator.of(context).pop();
}, },
label: Text(title), label: Text(title),
icon: Icon(icon), icon: Icon(icon),