summaryrefslogtreecommitdiff
path: root/Hutch/Views/Projects/ProjectMailingListView.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-01 23:25:54 -0500
committerChristian Cleberg <[email protected]>2026-04-01 23:25:54 -0500
commita83893afa086f0050c825144fa818024db4df056 (patch)
treec11c90f50acc633d2388e9a4940a4f3e7662b2a6 /Hutch/Views/Projects/ProjectMailingListView.swift
parent7fe5ec3f69211712d39f3a1dff090119340e05d9 (diff)
downloadhutch-2.8.0.tar.gz
hutch-2.8.0.tar.bz2
hutch-2.8.0.zip
feat: add Look Up screen and restrict management actions to ownersv2.8.0
Implements: https://todo.sr.ht/~ccleberg/Hutch/4
Diffstat (limited to 'Hutch/Views/Projects/ProjectMailingListView.swift')
-rw-r--r--Hutch/Views/Projects/ProjectMailingListView.swift18
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) {