aboutsummaryrefslogtreecommitdiffstats
path: root/frontend-vanilla/src/main.ts
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-16 19:17:59 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-16 19:17:59 -0800
commitb500776f035779f9b9ee23ab889afa93ca987212 (patch)
tree43b7edc592a4742969c5972c506fbc0f3feff438 /frontend-vanilla/src/main.ts
parente8a4f637dfa10510b350b95efaa4b5eb9a8f6f28 (diff)
downloadneko-b500776f035779f9b9ee23ab889afa93ca987212.tar.gz
neko-b500776f035779f9b9ee23ab889afa93ca987212.tar.bz2
neko-b500776f035779f9b9ee23ab889afa93ca987212.zip
Update V2/V3 'mark as read' logic to require item bottom to be above viewport, while keeping V1 unchanged
Diffstat (limited to 'frontend-vanilla/src/main.ts')
-rw-r--r--frontend-vanilla/src/main.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend-vanilla/src/main.ts b/frontend-vanilla/src/main.ts
index a8606e3..02e4188 100644
--- a/frontend-vanilla/src/main.ts
+++ b/frontend-vanilla/src/main.ts
@@ -291,8 +291,8 @@ export function renderItems() {
const el = document.querySelector(`.feed-item[data-id="${item._id}"]`);
if (el) {
const rect = el.getBoundingClientRect();
- // Mark as read if the top of the item is above the top of the container
- if (rect.top < containerRect.top) {
+ // Mark as read if the bottom of the item is above the top of the container
+ if (rect.bottom < containerRect.top) {
updateItem(item._id, { read: true });
}
}