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.