diff --git a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift index 609c0f5..884c8a0 100644 --- a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift +++ b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift @@ -15,8 +15,9 @@ struct EntryListView: View { // Safe because this view only appears on iPhone in portrait/landscape. private var viewportHeight: CGFloat { UIScreen.main.bounds.height } - // Dynamic threshold: max(100pt, 20% of viewport) - private var activationThreshold: CGFloat { max(100, viewportHeight * 0.2) } + // Fixed threshold — per-entry deltas are small (~1-2pt each), + // so 100pt accumulates after scrolling roughly one screenful. + private let activationThreshold: CGFloat = 100 var body: some View { if vm.isLoading && vm.entries.isEmpty { @@ -73,8 +74,10 @@ struct EntryListView: View { let isScrollingDown: Bool if let prev = prevMinY { let delta = prev - newMinY // positive = scrolling down - isScrollingDown = delta > 2 - if isScrollingDown { + // Per-entry deltas are small (~1-2pt per callback). + // Accept anything > 0.5 as genuine downward scroll. + isScrollingDown = delta > 0.5 + if delta > 0 { cumulativeDown += delta if cumulativeDown > activationThreshold { trackingActive = true @@ -96,17 +99,12 @@ 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)