From 1e3c748119c6e9eec27f02146f17ea0302ff648a Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Thu, 19 Mar 2026 01:53:46 -0500 Subject: feat: add inbox threads and move builds under more --- Hutch/Models/Inbox.swift | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Hutch/Models/Inbox.swift') 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 -- cgit v1.2.3