summaryrefslogtreecommitdiff
path: root/Hutch/Models
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-03-19 01:53:46 -0500
committerChristian Cleberg <[email protected]>2026-03-19 01:53:46 -0500
commit1e3c748119c6e9eec27f02146f17ea0302ff648a (patch)
tree6a5a7c6d22a9022b1b3daa3710768d12981ca0ed /Hutch/Models
parent441b69afae30ee6b662be38004fd7b5de1e47302 (diff)
downloadhutch-1e3c748119c6e9eec27f02146f17ea0302ff648a.tar.gz
hutch-1e3c748119c6e9eec27f02146f17ea0302ff648a.tar.bz2
hutch-1e3c748119c6e9eec27f02146f17ea0302ff648a.zip
feat: add inbox threads and move builds under more
Diffstat (limited to 'Hutch/Models')
-rw-r--r--Hutch/Models/Inbox.swift6
1 files changed, 6 insertions, 0 deletions
diff --git a/Hutch/Models/Inbox.swift b/Hutch/Models/Inbox.swift
index 720c71f..54e2685 100644
--- a/Hutch/Models/Inbox.swift
+++ b/Hutch/Models/Inbox.swift
@@ -178,6 +178,12 @@ enum InboxReadStateStore {
defaults.set(dictionary, forKey: key)
}
+ static func markUnread(for threadID: String, defaults: UserDefaults = .standard) {
+ var dictionary = defaults.dictionary(forKey: key) as? [String: TimeInterval] ?? [:]
+ dictionary.removeValue(forKey: threadID)
+ defaults.set(dictionary, forKey: key)
+ }
+
static func isUnread(threadID: String, lastActivityAt: Date, defaults: UserDefaults = .standard) -> Bool {
guard let lastViewedAt = lastViewedAt(for: threadID, defaults: defaults) else {
return true