diff --git a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift index 5525e24..d42b389 100644 --- a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift +++ b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift @@ -69,17 +69,21 @@ struct EntryListView: View { guard entryHeight > 0 else { return } // --- Scroll direction + activation --- - if let prev = lastKnownMinY[entryId] { + let prevMinY = lastKnownMinY[entryId] + let isScrollingDown: Bool + if let prev = prevMinY { let delta = prev - newMinY // positive = scrolling down - if delta > 2 { + isScrollingDown = delta > 2 + if isScrollingDown { cumulativeDown += delta if cumulativeDown > activationThreshold { trackingActive = true } } - // Don't reset trackingActive on upward scroll — - // just don't mark anything. Keeps cumulative progress. + } else { + isScrollingDown = false } + // Store AFTER reading previous value lastKnownMinY[entryId] = newMinY // --- Visibility tracking --- @@ -92,11 +96,8 @@ struct EntryListView: View { } // --- Mark-as-read --- - // Current scroll direction for THIS entry is "down" - // if its minY decreased since last check - let isMovingUp = (lastKnownMinY[entryId] ?? 0) <= newMinY guard trackingActive, - !isMovingUp, + isScrollingDown, !entry.isRead, !markedByScroll.contains(entryId), wasVisible.contains(entryId),