debug: round 3 — log which guard fails when entry near top
This commit is contained in:
@@ -99,6 +99,20 @@ struct EntryListView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// --- Mark-as-read ---
|
// --- 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,
|
guard trackingActive,
|
||||||
isScrollingDown,
|
isScrollingDown,
|
||||||
!entry.isRead,
|
!entry.isRead,
|
||||||
|
|||||||
Reference in New Issue
Block a user