diff options
| author | Christian Cleberg <[email protected]> | 2026-03-24 18:28:21 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-03-24 18:28:21 -0500 |
| commit | 94d0b581bbd2be7b63c07fe7f86d736daa96e1f9 (patch) | |
| tree | e0fb93129ab426c2ebdabd2ea3a84b713f843656 /Hutch/Views/Inbox/InboxViewModel.swift | |
| parent | 28c5b36bed9e3a4217415079827f657205a080f7 (diff) | |
| download | hutch-2.4.0.tar.gz hutch-2.4.0.tar.bz2 hutch-2.4.0.zip | |
v2.4.0: widgetsv2.4.0
Diffstat (limited to 'Hutch/Views/Inbox/InboxViewModel.swift')
| -rw-r--r-- | Hutch/Views/Inbox/InboxViewModel.swift | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Hutch/Views/Inbox/InboxViewModel.swift b/Hutch/Views/Inbox/InboxViewModel.swift index 42ce223..1d4cfd3 100644 --- a/Hutch/Views/Inbox/InboxViewModel.swift +++ b/Hutch/Views/Inbox/InboxViewModel.swift @@ -136,6 +136,7 @@ final class InboxViewModel { } return lhs.lastActivityAt > rhs.lastActivityAt } + NeedsAttentionSnapshotStore.update(unreadInboxThreads: threads.count) } catch { inboxListLogger.error("Inbox request failed") self.error = "Failed to load inbox" @@ -146,11 +147,13 @@ final class InboxViewModel { let viewedAt = max(Date(), thread.lastActivityAt) InboxReadStateStore.markViewed(viewedAt, for: thread.id) threads.removeAll { $0.id == thread.id } + NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: -1) } func markThreadUnread(_ thread: InboxThreadSummary) { InboxReadStateStore.markUnread(for: thread.id) updateThread(thread, isUnread: true) + NeedsAttentionSnapshotStore.adjustUnreadInboxThreads(by: 1) } func toggleThreadReadState(_ thread: InboxThreadSummary) { |
