summaryrefslogtreecommitdiff
path: root/Hutch/Views/Inbox/InboxThreadUtilities.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-20 13:15:04 -0500
committerChristian Cleberg <[email protected]>2026-04-20 13:15:04 -0500
commit380fb866d090c5f13b2ad3f88f1fe23c4ade4801 (patch)
treedfb90664e32c5f318a2fd1f107fed5ad9fff6e78 /Hutch/Views/Inbox/InboxThreadUtilities.swift
parent8b73fd9cd43753b36b3ab3ca5e4dc83a47ea3480 (diff)
downloadhutch-3.2.0.tar.gz
hutch-3.2.0.tar.bz2
hutch-3.2.0.zip
fix: collapse work inbox messages into thread summariesv3.2.0
Diffstat (limited to 'Hutch/Views/Inbox/InboxThreadUtilities.swift')
-rw-r--r--Hutch/Views/Inbox/InboxThreadUtilities.swift11
1 files changed, 11 insertions, 0 deletions
diff --git a/Hutch/Views/Inbox/InboxThreadUtilities.swift b/Hutch/Views/Inbox/InboxThreadUtilities.swift
new file mode 100644
index 0000000..1dd88a3
--- /dev/null
+++ b/Hutch/Views/Inbox/InboxThreadUtilities.swift
@@ -0,0 +1,11 @@
+import Foundation
+
+enum InboxThreadUtilities {
+ nonisolated static func deriveRepositoryName(from listName: String) -> String? {
+ let separators = ["-devel", "-patches", "-dev", ".patches"]
+ for separator in separators where listName.hasSuffix(separator) {
+ return String(listName.dropLast(separator.count))
+ }
+ return nil
+ }
+}