From f0717ce3474e386b9fbb17739413ae1974873556 Mon Sep 17 00:00:00 2001 From: Yusuf Suleman Date: Sat, 4 Apr 2026 00:16:09 -0500 Subject: [PATCH] =?UTF-8?q?debug:=20round=203=20=E2=80=94=20log=20which=20?= =?UTF-8?q?guard=20fails=20when=20entry=20near=20top?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Features/Reader/Views/EntryListView.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift index 884c8a0..58272b9 100644 --- a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift +++ b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift @@ -99,6 +99,20 @@ struct EntryListView: View { } // --- Mark-as-read --- + if vm.entries.prefix(3).contains(where: { $0.id == entryId }) && frame.maxY < 50 { + var fails: [String] = [] + if !trackingActive { fails.append("inactive(\(Int(cumulativeDown))/\(Int(activationThreshold)))") } + if !isScrollingDown { fails.append("notDown") } + if entry.isRead { fails.append("alreadyRead") } + if markedByScroll.contains(entryId) { fails.append("alreadyMarked") } + if !wasVisible.contains(entryId) { fails.append("notVisible") } + if frame.maxY >= 0 { fails.append("aboveVP(\(Int(frame.maxY)))") } + if fails.isEmpty { + print("[SCROLL] ✅ WILL MARK id=\(entryId)") + } else { + print("[SCROLL] ❌ id=\(entryId) maxY=\(Int(frame.maxY)) fails=\(fails.joined(separator: ","))") + } + } guard trackingActive, isScrollingDown, !entry.isRead,