feat: align single and multi-mail actions, add archive (#287) #291

Merged
guettlibot merged 2 commits from issue-287-fix into main 2026-05-27 17:36:15 +00:00
guettlibot commented 2026-05-27 17:18:33 +00:00 (Migrated from codeberg.org)

Summary

  • Add Archive action to single mail view (was missing)
  • Reorder single-mail app bar actions to match batch selection toolbar: Reply, Forward, Archive, Delete, Mark as spam, Move to folder, Snooze, Flag
  • Move "Mark as unread" from standalone icon button into the popup submenu
  • Extract shared resolveMailboxByRole() helper so both single-mail and batch archive/spam actions use identical dialog flow (choose existing or create folder)
  • Update _markAsSpam in detail screen to use the shared helper instead of showing a bare snackbar when no junk folder exists

Test plan

  • flutter analyze — no issues
  • 475 widget + unit tests pass
  • Pre-commit hooks (format, analyze, tests, coverage) pass
  • Archive button visible in email detail app bar
  • Archive shows "No archive folder found" dialog when no archive folder
  • Mark as unread is in popup menu, not a standalone button
  • Mark as spam shows dialog when no junk folder (consistent with batch behavior)

🤖 Generated with Claude Code

## Summary - Add **Archive** action to single mail view (was missing) - **Reorder** single-mail app bar actions to match batch selection toolbar: Reply, Forward, Archive, Delete, Mark as spam, Move to folder, Snooze, Flag - Move **"Mark as unread"** from standalone icon button into the popup submenu - Extract shared `resolveMailboxByRole()` helper so both single-mail and batch archive/spam actions use identical dialog flow (choose existing or create folder) - Update `_markAsSpam` in detail screen to use the shared helper instead of showing a bare snackbar when no junk folder exists ## Test plan - [x] `flutter analyze` — no issues - [x] 475 widget + unit tests pass - [x] Pre-commit hooks (format, analyze, tests, coverage) pass - [x] Archive button visible in email detail app bar - [x] Archive shows "No archive folder found" dialog when no archive folder - [x] Mark as unread is in popup menu, not a standalone button - [x] Mark as spam shows dialog when no junk folder (consistent with batch behavior) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.