summaryrefslogtreecommitdiff
path: root/Hutch/Models
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-12 00:34:54 -0500
committerChristian Cleberg <[email protected]>2026-04-12 00:34:54 -0500
commit5f6d545eb3455a9e4da5a3cb4460811e3a48d939 (patch)
tree7b7591146da4e02bd617ddb9f26e47b1c4474ef6 /Hutch/Models
parentcb1ea5ea4f163d87053285d3fb7999b12a3558b9 (diff)
downloadhutch-5f6d545eb3455a9e4da5a3cb4460811e3a48d939.tar.gz
hutch-5f6d545eb3455a9e4da5a3cb4460811e3a48d939.tar.bz2
hutch-5f6d545eb3455a9e4da5a3cb4460811e3a48d939.zip
improve home attention flows and cross-linkingv2.14.0
Diffstat (limited to 'Hutch/Models')
-rw-r--r--Hutch/Models/Inbox.swift8
1 files changed, 6 insertions, 2 deletions
diff --git a/Hutch/Models/Inbox.swift b/Hutch/Models/Inbox.swift
index c89cb12..8ab2480 100644
--- a/Hutch/Models/Inbox.swift
+++ b/Hutch/Models/Inbox.swift
@@ -52,10 +52,14 @@ struct InboxThreadSummary: Identifiable, Hashable, Sendable {
}
var threadGroupingKey: String {
- "\(listRID)#\(displaySubject.lowercased())"
+ "\(listRID)#\(Self.normalizationKey(for: subject))"
}
- private static func normalizedSubject(from subject: String) -> String {
+ nonisolated static func normalizationKey(for subject: String) -> String {
+ normalizedSubject(from: subject).lowercased()
+ }
+
+ private nonisolated static func normalizedSubject(from subject: String) -> String {
let collapsedWhitespace = subject
.replacingOccurrences(of: #"\s+"#, with: " ", options: .regularExpression)
.trimmingCharacters(in: .whitespacesAndNewlines)