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,