From da44ee8b739b85b04343960d835a281c02cebd41 Mon Sep 17 00:00:00 2001 From: Yusuf Suleman Date: Fri, 3 Apr 2026 20:19:06 -0500 Subject: [PATCH] fix: mark as read when entry scrolls OFF screen, not on appear MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uses .onDisappear instead of .onAppear — entries are marked as read only when they scroll past the top of the viewport, not when the list first renders. Same behavior as proper RSS readers. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Platform/Features/Reader/Views/EntryListView.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift index c73e6c9..f5e9a14 100644 --- a/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift +++ b/ios/Platform/Platform/Features/Reader/Views/EntryListView.swift @@ -42,6 +42,12 @@ struct EntryListView: View { } .buttonStyle(.plain) .contentShape(Rectangle()) + .onDisappear { + // Mark as read when card scrolls off the top + if !entry.isRead { + Task { await vm.markAsRead(entry) } + } + } .contextMenu { entryContextMenu(entry: entry, vm: vm) } @@ -65,7 +71,7 @@ struct EntryListView: View { } .buttonStyle(.plain) .contentShape(Rectangle()) - .onAppear { + .onDisappear { if !entry.isRead { Task { await vm.markAsRead(entry) } }