Skip to content

Commit

Permalink
Don't move scheduled drafts into subfolder if already there
Browse files Browse the repository at this point in the history
Thunderbird was changed in release 115.2 so that if you edit a draft
that's in a subfolder of your Drafts folder and then save it, it goes
back into the same folder; previously it was saved into the default
Drafts folder for the account, not the subfolder. This broke Send
Later's "Store scheduled messages in subfolder" feature: if you edited
a scheduled message in a subfolder and then scheduled the edited
message, it would be saved in a subfolder of the subfolder instead of
saving in the subfolder it started in. This is now fixed.
  • Loading branch information
jikamens committed Feb 25, 2024
1 parent 4571358 commit 3c72c0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ var SLTools = {
let subfolderName = preferences.subfolderName;
if (!subfolderName) return;
let folder = msg.folder;
// If the message is already in an appropriately named subfolder then
// don't go another level deep. Necessary starting in TB 115.2, because
// they changed TB so drafts loaded from a particular subfolder get saved
// back to that subfolder.
if (folder.path.endsWith("/" + subfolderName)) return;
let found;
let subfolder;
for (subfolder of await messenger.folders.getSubFolders(folder)) {
Expand Down

0 comments on commit 3c72c0d

Please sign in to comment.