From e22418c6dd9dd39296353272ca752d0a0098d353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCttler?= Date: Mon, 27 Apr 2026 07:40:01 +0200 Subject: [PATCH] feat: add Email filters entry to FolderDrawer for JMAP accounts The Sieve script editor was only reachable via the hidden popup menu on the account list. Adding an 'Email filters' tile to the drawer makes it discoverable from any mailbox view for JMAP accounts. Co-Authored-By: Claude Sonnet 4.6 --- done.md | 7 +++++++ lib/ui/widgets/folder_drawer.dart | 12 ++++++++++++ next.md | 4 ---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/done.md b/done.md index f312298..8f37630 100644 --- a/done.md +++ b/done.md @@ -6,6 +6,13 @@ Tasks get moved from next.md to done.md ## Tasks +## Email filters accessible from inside an account + +Added "Email filters" entry to `FolderDrawer` (below "All accounts", above the folder +list). Visible only for JMAP accounts (`accountAsync.valueOrNull?.type == AccountType.jmap`). +Tapping it closes the drawer and pushes `/accounts/:id/sieve`. Previously the Sieve script +editor was only reachable via the hidden popup menu on the account list. + ## Bulk actions on search results Long-pressing a search result enters selection mode; tapping additional results adds/removes diff --git a/lib/ui/widgets/folder_drawer.dart b/lib/ui/widgets/folder_drawer.dart index 92ae08e..270a28f 100644 --- a/lib/ui/widgets/folder_drawer.dart +++ b/lib/ui/widgets/folder_drawer.dart @@ -1,7 +1,10 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; +import 'package:sharedinbox/core/models/account.dart'; import 'package:sharedinbox/core/models/mailbox.dart'; import 'package:sharedinbox/di.dart'; @@ -82,6 +85,15 @@ class FolderDrawer extends ConsumerWidget { context.go('/accounts'); }, ), + if (accountAsync.valueOrNull?.type == AccountType.jmap) + ListTile( + leading: const Icon(Icons.filter_list), + title: const Text('Email filters'), + onTap: () { + Navigator.pop(context); + unawaited(context.push('/accounts/$accountId/sieve')); + }, + ), const Divider(height: 1), Expanded( child: StreamBuilder( diff --git a/next.md b/next.md index 8d95269..3c3f656 100644 --- a/next.md +++ b/next.md @@ -18,10 +18,6 @@ Then commit. ## Tasks -How can I edit the Sieve Filter? - ---- - When adding a new account, and no well-known file was found, not exact hint in DNS, then SMTP/IMAP/JMAP should use the mx record as fallback.