@bobfrankston/rmfmail 1.1.216 → 1.1.217
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 +22 -11
- package/client/app.bundle.js.map +2 -2
- package/client/components/message-list.js +33 -16
- package/client/components/message-list.js.map +1 -1
- package/client/components/message-list.ts +35 -16
- package/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-24144 → node_modules.npmglobalize-stash-90796}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -2736,19 +2736,30 @@ function currentViewKey() {
|
|
|
2736
2736
|
}
|
|
2737
2737
|
function withScrollAnchor(body, doRender) {
|
|
2738
2738
|
const scrollTop = body.scrollTop;
|
|
2739
|
-
|
|
2740
|
-
doRender();
|
|
2741
|
-
return;
|
|
2742
|
-
}
|
|
2743
|
-
const rowsBefore = Array.from(body.querySelectorAll(".ml-row"));
|
|
2739
|
+
const viewportH = body.clientHeight;
|
|
2744
2740
|
let anchorUuid = "";
|
|
2745
2741
|
let anchorOffsetWithinViewport = 0;
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2742
|
+
const selected = body.querySelector(".ml-row.selected");
|
|
2743
|
+
if (selected) {
|
|
2744
|
+
const vt = selected.offsetTop - scrollTop;
|
|
2745
|
+
if (vt > -selected.offsetHeight && vt < viewportH) {
|
|
2746
|
+
anchorUuid = selected.dataset.uuid || "";
|
|
2747
|
+
anchorOffsetWithinViewport = vt;
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
if (!anchorUuid) {
|
|
2751
|
+
if (scrollTop < 4) {
|
|
2752
|
+
doRender();
|
|
2753
|
+
return;
|
|
2754
|
+
}
|
|
2755
|
+
const rowsBefore = Array.from(body.querySelectorAll(".ml-row"));
|
|
2756
|
+
for (const r of rowsBefore) {
|
|
2757
|
+
const visualTop = r.offsetTop - scrollTop;
|
|
2758
|
+
if (visualTop >= 0) {
|
|
2759
|
+
anchorUuid = r.dataset.uuid || "";
|
|
2760
|
+
anchorOffsetWithinViewport = visualTop;
|
|
2761
|
+
break;
|
|
2762
|
+
}
|
|
2752
2763
|
}
|
|
2753
2764
|
}
|
|
2754
2765
|
doRender();
|