Skip to content

Show current mail folder in move target dropdown #11222

Description

@hrb-hub

Currently, when moving mails, the current folder is hidden from the move target dropdown, see:

export async function getMoveTargetFolderSystemsForMailsInFolder(foldersModel: MailModel, currentFolder: MailSet): Promise<Array<FolderInfo>> {
const mailboxDetails = await foldersModel.getMailboxDetailsForMailFolder(currentFolder)
if (mailboxDetails == null) {
return []
}
const folders = await foldersModel.getMailboxFoldersForId(mailboxDetails.mailbox.mailSets._id)
if (folders == null) {
return []
}
return folders.getIndentedList().filter((f: IndentedFolder) => {
return !isFolderReadOnly(f.folder) && !isSameId(f.folder._id, currentFolder._id)
})
}

So when moving mails from a folder with children, and because the parent folder is not shown, its children appear as if they're nested within another folder (the folder above their parent in the dropdown) which can be confusing.

Example:
When moving mails from Parent with the following folder tree:

SiblingOfParent
Parent
.Child1
.Child2
..GrandChild

the move drop down is shown as:

SiblingOfParent
.Child1
.Child2
..GrandChild

Metadata

Metadata

Assignees

No one assigned

    Labels

    small improvementA small improvement which can hopefully be implemented within a short time frame.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions