Add folder full name to message uids set

This commit is contained in:
the-djmaze 2023-11-26 17:52:20 +01:00
parent df7888e3a6
commit eb802135a9
3 changed files with 12 additions and 8 deletions

View file

@ -114,6 +114,7 @@ addComputablesTo(MessagelistUserStore, {
let result = new Set;
MessagelistUserStore.listCheckedOrSelected().forEach(message => {
result.add(message.uid);
result.folder = message.folder;
if (1 < message.threadsLen()) {
message.threads().forEach(result.add, result);
}

View file

@ -91,9 +91,10 @@ export class MailFolderList extends AbstractViewLeft {
if (folder) {
if (moveAction()) {
moveAction(false);
MessagelistUserStore.moveMessages(
FolderUserStore.currentFolderFullName(),
MessagelistUserStore.listCheckedOrSelectedUidsWithSubMails(),
let messages = MessagelistUserStore.listCheckedOrSelectedUidsWithSubMails();
messages.size && MessagelistUserStore.moveMessages(
messages.folder,
messages,
folder.fullName,
event.ctrlKey
);

View file

@ -59,13 +59,15 @@ const
*/
listAction = (...args) => MessagelistUserStore.setAction(...args),
moveMessagesToFolderType = (toFolderType, bDelete) =>
rl.app.moveMessagesToFolderType(
moveMessagesToFolderType = (toFolderType, bDelete) => {
let messages = MessagelistUserStore.listCheckedOrSelectedUidsWithSubMails();
messages.size && rl.app.moveMessagesToFolderType(
toFolderType,
FolderUserStore.currentFolderFullName(),
MessagelistUserStore.listCheckedOrSelectedUidsWithSubMails(),
messages.folder,
messages,
bDelete
),
)
},
pad2 = v => 10 > v ? '0' + v : '' + v,
Ymd = dt => dt.getFullYear() + pad2(1 + dt.getMonth()) + pad2(dt.getDate()),