@bobfrankston/rmfmail 1.2.13 → 1.2.14
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/client/app.bundle.js +21 -10
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +27 -9
- package/client/app.js.map +1 -1
- package/client/app.ts +25 -8
- package/package.json +1 -1
package/client/app.js
CHANGED
|
@@ -3604,18 +3604,36 @@ document.addEventListener("keydown", (e) => {
|
|
|
3604
3604
|
// from the search box or compose draft list.
|
|
3605
3605
|
if (!e.ctrlKey && inText)
|
|
3606
3606
|
return;
|
|
3607
|
+
e.preventDefault();
|
|
3608
|
+
const applySeen = (m, seen) => {
|
|
3609
|
+
setSeen(m, seen);
|
|
3610
|
+
updateFlags(m.accountId, m.uid, m.flags).then(() => {
|
|
3611
|
+
messageState.updateMessageFlags(m.accountId, m.uid, m.flags);
|
|
3612
|
+
const row = document.querySelector(`.ml-row[data-uid="${m.uid}"][data-account-id="${CSS.escape(m.accountId)}"]`);
|
|
3613
|
+
if (row)
|
|
3614
|
+
row.classList.toggle("unread", !seen);
|
|
3615
|
+
}).catch(() => { setSeen(m, !seen); });
|
|
3616
|
+
};
|
|
3617
|
+
// getSelectedMessages returns only id tuples — resolve to the full
|
|
3618
|
+
// message objects (with flags) from the list state.
|
|
3619
|
+
const selectedIds = getSelectedMessages();
|
|
3620
|
+
if (selectedIds.length > 1) {
|
|
3621
|
+
// Multi-select → mark every selected message READ (not a toggle):
|
|
3622
|
+
// a triage sweep is "I've dealt with these," not "flip each one"
|
|
3623
|
+
// (Bob 2026-06-15). Skip those already read.
|
|
3624
|
+
const all = messageState.getMessages();
|
|
3625
|
+
for (const id of selectedIds) {
|
|
3626
|
+
const m = all.find(x => x.accountId === id.accountId && x.uid === id.uid && x.folderId === id.folderId);
|
|
3627
|
+
if (m && !seenOf(m))
|
|
3628
|
+
applySeen(m, true);
|
|
3629
|
+
}
|
|
3630
|
+
return;
|
|
3631
|
+
}
|
|
3632
|
+
// Single → toggle read/unread.
|
|
3607
3633
|
const sel = getCurrentFocused();
|
|
3608
3634
|
if (!sel)
|
|
3609
3635
|
return;
|
|
3610
|
-
|
|
3611
|
-
const wasSeen = seenOf(sel);
|
|
3612
|
-
setSeen(sel, !wasSeen);
|
|
3613
|
-
updateFlags(sel.accountId, sel.uid, sel.flags).then(() => {
|
|
3614
|
-
messageState.updateMessageFlags(sel.accountId, sel.uid, sel.flags);
|
|
3615
|
-
const row = document.querySelector(`.ml-row[data-uid="${sel.uid}"][data-account-id="${sel.accountId}"]`);
|
|
3616
|
-
if (row)
|
|
3617
|
-
row.classList.toggle("unread", wasSeen);
|
|
3618
|
-
}).catch(() => { setSeen(sel, wasSeen); });
|
|
3636
|
+
applySeen(sel, !seenOf(sel));
|
|
3619
3637
|
}
|
|
3620
3638
|
// Z = locate the focused row in the list (scroll-to-selected). After
|
|
3621
3639
|
// scrolling the list out of sync with the preview, this snaps back.
|