From 0103454e31ac68a80aca38b01c7db29415eb8146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCttler?= Date: Mon, 27 Apr 2026 07:20:16 +0200 Subject: [PATCH] feat: add 'All accounts' entry to FolderDrawer for back-navigation Users had no obvious way to return to the account list after opening an account. Adding an 'All accounts' tile at the top of the drawer (visible in both MailboxListScreen and EmailListScreen) lets users navigate to /accounts from anywhere inside an account. Co-Authored-By: Claude Sonnet 4.6 --- done.md | 7 +++++++ lib/ui/widgets/folder_drawer.dart | 9 +++++++++ next.md | 6 ------ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/done.md b/done.md index 8b9e727..aad36d8 100644 --- a/done.md +++ b/done.md @@ -6,6 +6,13 @@ Tasks get moved from next.md to done.md ## Tasks +## Navigate back to account list from inside an account + +Added an "All accounts" tile (with `Icons.switch_account`) at the top of `FolderDrawer`, +above a divider and the folder list. Tapping it closes the drawer and navigates to +`/accounts` via `context.go`. The drawer is shown in both `MailboxListScreen` and +`EmailListScreen`, so this entry point is reachable from anywhere inside an account. + ## Speed up `task deploy-android` Two parallelism improvements: diff --git a/lib/ui/widgets/folder_drawer.dart b/lib/ui/widgets/folder_drawer.dart index 0b8f1a8..92ae08e 100644 --- a/lib/ui/widgets/folder_drawer.dart +++ b/lib/ui/widgets/folder_drawer.dart @@ -74,6 +74,15 @@ class FolderDrawer extends ConsumerWidget { ), ), ), + ListTile( + leading: const Icon(Icons.switch_account), + title: const Text('All accounts'), + onTap: () { + Navigator.pop(context); + context.go('/accounts'); + }, + ), + const Divider(height: 1), Expanded( child: StreamBuilder( stream: mailboxRepo.observeMailboxes(accountId), diff --git a/next.md b/next.md index 4246423..d1141bb 100644 --- a/next.md +++ b/next.md @@ -18,12 +18,6 @@ Then commit. ## Tasks -I opened an account. How to get back to the list of accounts? - -I saw no way to do that. - ---- - I opened a mailbox. I search for "foo bar". I want to see all mails containing foo and bar. Not mails containing "foo bar" exactly.