From 85a38705ec7be640f8a18f149acddf9e02420499 Mon Sep 17 00:00:00 2001 From: Yusuf Suleman Date: Sat, 4 Apr 2026 00:11:12 -0500 Subject: [PATCH] debug: add scroll tracking logs round 2 --- .../Platform/Features/Reader/Views/EntryListView.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift index d42b389..609c0f5 100644 --- a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift +++ b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift @@ -96,12 +96,17 @@ struct EntryListView: View { } // --- 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, isScrollingDown, !entry.isRead, !markedByScroll.contains(entryId), wasVisible.contains(entryId), frame.maxY < 0 else { return } + if debugThis { print("[SCROLL-READ] ✅ id=\(entryId)") } markedByScroll.insert(entryId)