feat: add 'Create new folder' option to Move To Folder dialog #423

Merged
guettlibot merged 9 commits from issue-422-move-to-folder-create-new into main 2026-06-05 16:53:37 +00:00
guettlibot commented 2026-06-04 17:32:39 +00:00 (Migrated from codeberg.org)

Summary

  • Adds a Create new folder… tile at the bottom of the "Move to…" bottom sheet in the single mail view
  • Tapping it shows an AlertDialog with a text field; confirming creates the folder on the server (IMAP or JMAP) and immediately moves the email there
  • Extends MailboxRepository with a createMailbox(accountId, name) method (no special role) and implements it for both IMAP and JMAP by making the role parameter nullable in the shared private helpers

Test plan

  • Open a mail in the single mail view
  • Tap the kebab menu → "Move to folder"
  • Verify the bottom sheet shows existing folders plus a "Create new folder…" tile at the bottom
  • Tap "Create new folder…", enter a name, tap "Create"
  • Verify the folder is created on the server and the email is moved to it
  • Verify the undo action correctly references the new folder's path
  • Verify cancelling the name dialog returns to the mail without any move

Closes #422

## Summary - Adds a **Create new folder…** tile at the bottom of the "Move to…" bottom sheet in the single mail view - Tapping it shows an `AlertDialog` with a text field; confirming creates the folder on the server (IMAP or JMAP) and immediately moves the email there - Extends `MailboxRepository` with a `createMailbox(accountId, name)` method (no special role) and implements it for both IMAP and JMAP by making the role parameter nullable in the shared private helpers ## Test plan - [ ] Open a mail in the single mail view - [ ] Tap the kebab menu → "Move to folder" - [ ] Verify the bottom sheet shows existing folders **plus** a "Create new folder…" tile at the bottom - [ ] Tap "Create new folder…", enter a name, tap "Create" - [ ] Verify the folder is created on the server and the email is moved to it - [ ] Verify the undo action correctly references the new folder's path - [ ] Verify cancelling the name dialog returns to the mail without any move Closes #422
Sign in to join this conversation.