diff options
Diffstat (limited to 'Hutch/Views/Projects')
| -rw-r--r-- | Hutch/Views/Projects/ProjectMailingListView.swift | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Hutch/Views/Projects/ProjectMailingListView.swift b/Hutch/Views/Projects/ProjectMailingListView.swift index 39645be..832c889 100644 --- a/Hutch/Views/Projects/ProjectMailingListView.swift +++ b/Hutch/Views/Projects/ProjectMailingListView.swift @@ -257,7 +257,23 @@ struct MailingListDetailView: View { List { ForEach(viewModel.filteredThreads) { thread in - NavigationLink(value: MoreRoute.thread(thread)) { + NavigationLink { + ThreadDetailView( + thread: thread, + onViewed: { + InboxReadStateStore.markViewed(max(Date(), thread.lastActivityAt), for: thread.id) + NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: -1) + }, + onMarkRead: { + InboxReadStateStore.markViewed(max(Date(), thread.lastActivityAt), for: thread.id) + NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: -1) + }, + onMarkUnread: { + InboxReadStateStore.markUnread(for: thread.id) + NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: 1) + } + ) + } label: { InboxThreadRow(thread: thread) } .swipeActions(edge: .trailing, allowsFullSwipe: true) { |
