summaryrefslogtreecommitdiff
path: root/Hutch/Views/Inbox/InboxView.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-03-19 15:17:38 -0500
committerChristian Cleberg <[email protected]>2026-03-19 15:17:38 -0500
commit6ba4e967d5dfb5d3c7bb97a0f2662f3180595563 (patch)
tree572bef546fcca19ad37bc1aa7cfb153eb2bf8eb7 /Hutch/Views/Inbox/InboxView.swift
parent1e3c748119c6e9eec27f02146f17ea0302ff648a (diff)
downloadhutch-6ba4e967d5dfb5d3c7bb97a0f2662f3180595563.tar.gz
hutch-6ba4e967d5dfb5d3c7bb97a0f2662f3180595563.tar.bz2
hutch-6ba4e967d5dfb5d3c7bb97a0f2662f3180595563.zip
feat: implement support for projects, lists, and pastes
Diffstat (limited to 'Hutch/Views/Inbox/InboxView.swift')
-rw-r--r--Hutch/Views/Inbox/InboxView.swift15
1 files changed, 6 insertions, 9 deletions
diff --git a/Hutch/Views/Inbox/InboxView.swift b/Hutch/Views/Inbox/InboxView.swift
index 602f8d9..304e62d 100644
--- a/Hutch/Views/Inbox/InboxView.swift
+++ b/Hutch/Views/Inbox/InboxView.swift
@@ -51,9 +51,9 @@ struct InboxView: View {
)
} else if viewModel.threads.isEmpty, viewModel.error == nil {
ContentUnavailableView(
- "No Threads",
+ "Inbox Zero",
systemImage: "tray",
- description: Text("Patch threads will appear here.")
+ description: Text("Unread threads will appear here.")
)
}
}
@@ -75,19 +75,16 @@ struct InboxView: View {
private func readStateAction(for thread: InboxThreadSummary, in viewModel: InboxViewModel) -> some View {
Button {
withAnimation(.easeInOut(duration: 0.2)) {
- viewModel.toggleThreadReadState(thread)
+ viewModel.markThreadRead(thread)
}
} label: {
- Label(
- thread.isUnread ? "Mark as Read" : "Mark as Unread",
- systemImage: thread.isUnread ? "envelope.open" : "envelope.badge"
- )
+ Label("Mark as Read", systemImage: "envelope.open")
}
- .tint(thread.isUnread ? .blue : .gray)
+ .tint(.blue)
}
}
-private struct InboxThreadRow: View {
+struct InboxThreadRow: View {
let thread: InboxThreadSummary
var body: some View {