@bobfrankston/rmfmail 1.1.98 → 1.1.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.commitmsg CHANGED
@@ -1,7 +1,16 @@
1
- Signature now applied to replies/forwards, not just new mail
1
+ Fix duplicate drafts (unserialized autosave) + shift-click range select
2
2
 
3
- The new-format signature (acct.sig.text) was gated on "new mail only",
4
- so anyone using it got no signature on a reply or forward — only the
5
- legacy acct.signature field covered replies. Both formats now apply to
6
- new + reply + forward alike: above the quoted block on a reply/forward,
7
- at the end on new mail. Drafts still skip it (already in the saved body).
3
+ Duplicate drafts: enqueueDraftPush fired imapManager.saveDraft immediately
4
+ on every autosave (~every 2 s). An IMAP search-delete-append cycle takes
5
+ longer than that, so pushes overlapped each one's "find the stale copy"
6
+ ran before a sibling's "append", neither saw the other's new copy, and
7
+ the Drafts folder filled with dozens of duplicates. enqueueDraftPush now
8
+ serializes per draftId: one push in flight at a time, and while it runs
9
+ only the latest queued content is kept (intermediate autosaves are
10
+ superseded — fewer IMAP ops too).
11
+
12
+ Shift-click range select: selectRange now sets `multi-select-on` for a
13
+ multi-row range. Without it, the focusRow() call right after (drives the
14
+ viewer off the clicked row) ran its single-select sweep and wiped every
15
+ row in the range except the clicked one — a regression from the v1.1.88
16
+ highlight-desync fix.
@@ -2633,6 +2633,8 @@ function selectRange(from, to) {
2633
2633
  return;
2634
2634
  const lo = Math.min(fromIdx, toIdx);
2635
2635
  const hi = Math.max(fromIdx, toIdx);
2636
+ if (hi > lo)
2637
+ body.classList.add("multi-select-on");
2636
2638
  for (let i = lo; i <= hi; i++)
2637
2639
  rows[i].classList.add("selected");
2638
2640
  }