debug: add scroll tracking logs round 2
All checks were successful
Security Checks / dependency-audit (push) Successful in 14s
Security Checks / secret-scanning (push) Successful in 3s
Security Checks / dockerfile-lint (push) Successful in 4s

This commit is contained in:
Yusuf Suleman
2026-04-04 00:11:12 -05:00
parent 78ee06695b
commit 85a38705ec

View File

@@ -96,12 +96,17 @@ struct EntryListView: View {
} }
// --- Mark-as-read --- // --- Mark-as-read ---
let debugThis = vm.entries.prefix(3).contains(where: { $0.id == entryId })
if debugThis {
print("[SCROLL] id=\(entryId) minY=\(Int(newMinY)) maxY=\(Int(frame.maxY)) down=\(isScrollingDown) active=\(trackingActive) cumDown=\(Int(cumulativeDown)) wasVis=\(wasVisible.contains(entryId)) visR=\(String(format:"%.2f",visibleRatio)) vpH=\(Int(viewportHeight)) read=\(entry.isRead) marked=\(markedByScroll.contains(entryId))")
}
guard trackingActive, guard trackingActive,
isScrollingDown, isScrollingDown,
!entry.isRead, !entry.isRead,
!markedByScroll.contains(entryId), !markedByScroll.contains(entryId),
wasVisible.contains(entryId), wasVisible.contains(entryId),
frame.maxY < 0 else { return } frame.maxY < 0 else { return }
if debugThis { print("[SCROLL-READ] ✅ id=\(entryId)") }
markedByScroll.insert(entryId) markedByScroll.insert(entryId)