mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-25 00:25:03 +08:00
Fix drag from label to label not removing origin label
This commit is contained in:
parent
72a4cbd3dd
commit
2dce6fcb6a
1 changed files with 5 additions and 3 deletions
|
@ -325,14 +325,14 @@ class CategoryMailboxPerspective extends MailboxPerspective
|
|||
currentCat = current.categories().find((c) -> c.accountId == accountId)
|
||||
|
||||
if myCat instanceof Folder
|
||||
# folder/label to folder
|
||||
return new ChangeFolderTask({
|
||||
threads: accountThreads,
|
||||
source: "Dragged into list",
|
||||
folder: myCat,
|
||||
})
|
||||
|
||||
# We are a label!
|
||||
if currentCat instanceof Folder
|
||||
else if myCat instanceof Label and currentCat instanceof Folder
|
||||
# folder to label
|
||||
# dragging from trash or spam into a label? We need to both apply the label and move.
|
||||
return [
|
||||
new ChangeFolderTask({
|
||||
|
@ -347,11 +347,13 @@ class CategoryMailboxPerspective extends MailboxPerspective
|
|||
})
|
||||
]
|
||||
else
|
||||
# label to label
|
||||
return [
|
||||
new ChangeLabelsTask({
|
||||
threads: accountThreads,
|
||||
source: "Dragged into list",
|
||||
labelsToAdd: [myCat],
|
||||
labelsToRemove: [currentCat],
|
||||
})
|
||||
]
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue