From a83893afa086f0050c825144fa818024db4df056 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Wed, 1 Apr 2026 23:25:54 -0500 Subject: feat: add Look Up screen and restrict management actions to owners Implements: https://todo.sr.ht/~ccleberg/Hutch/4 --- Hutch/Views/Projects/ProjectMailingListView.swift | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Hutch/Views/Projects/ProjectMailingListView.swift') 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) { -- cgit v1.2.3