Skip to content

Commit

Permalink
Only update folders after saving drafts into them
Browse files Browse the repository at this point in the history
In 1f411be, I added code to tell
Thunderbird to update its index for folders when scanning them for
scheduled drafts. This caused an unexpected problem I've been hearing
about from a number of people: it's causing repeated password prompts
for accounts that people don't save their passwords for in
Thunderbird's password manager.

To avoid this problem, I'm pulling back and only updating folders
while waiting for just-saved drafts to appear in them.
  • Loading branch information
jikamens committed Jan 15, 2024
1 parent e454b01 commit 3bee829
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ var SLTools = {
SLStatic.debug("Starting to wait for", hdr);
let found = false;
while (Date.now() - start < timeout) {
await messenger.SL3U.updateFolder(hdr.folder);
let result = await SLTools.forAllDrafts((dHdr) => dHdr.id == hdr.id);
if (result.some((v) => v)) {
found = true;
Expand Down Expand Up @@ -294,7 +295,6 @@ var SLTools = {
}
let draftFolders = await SLTools.getDraftFolders(acct);
for (let folder of draftFolders) {
await messenger.SL3U.updateFolder(folder);
let page = await messenger.messages.list(folder);
while (true) {
if (sequential) {
Expand Down

0 comments on commit 3bee829

Please sign in to comment.