diff options
| author | Christian Cleberg <[email protected]> | 2026-07-15 19:31:17 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-07-15 19:31:17 -0500 |
| commit | eff81f34bb51ecc6e0aa5d831567db2cea0527a9 (patch) | |
| tree | 5a15795380b4f98c4b003f1243409f8e7b59caa3 /Hutch/Models | |
| parent | c5247f7021090358e8db70daa9ed09521e9f206a (diff) | |
| download | hutch-eff81f34bb51ecc6e0aa5d831567db2cea0527a9.tar.gz hutch-eff81f34bb51ecc6e0aa5d831567db2cea0527a9.tar.bz2 hutch-eff81f34bb51ecc6e0aa5d831567db2cea0527a9.zip | |
fix: give inbox threads identity distinct from their grouping key
InboxThreadSummary.id returned threadGroupingKey, which is listRID plus the
subject with Re:/Fwd: stripped. Two unrelated threads on one list sharing a
subject therefore shared an id — common on sourcehut, where "[PATCH] test" is
an ordinary subject — which collides under Identifiable in every list that
renders these summaries.
Key id on the root Message-ID, which is unique per thread, and leave
threadGroupingKey subject-based so replies still collapse into one
conversation.
Read state moves to threadGroupingKey at each call site. It was already
keyed on that string via id, so persisted keys are unchanged and marking a
conversation read still covers the whole subject group, matching how
HomeViewModel already builds the key for isUnread.
Diffstat (limited to 'Hutch/Models')
| -rw-r--r-- | Hutch/Models/Inbox.swift | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Hutch/Models/Inbox.swift b/Hutch/Models/Inbox.swift index 071bcbc..be2e105 100644 --- a/Hutch/Models/Inbox.swift +++ b/Hutch/Models/Inbox.swift @@ -17,8 +17,11 @@ struct InboxThreadSummary: Identifiable, Hashable, Sendable { let containsPatch: Bool let isUnread: Bool + /// Identity is per-thread, keyed on the root Message-ID. It deliberately differs + /// from ``threadGroupingKey``, which is subject-based so replies collapse into + /// one conversation — two unrelated threads can share a subject on the same list. var id: String { - threadGroupingKey + "\(listRID)#\(rootMessageID)" } var listDisplayName: String { |
