ios: every chat row reserves the two preview lines — app rows without a recent message no longer collapse shorter (#567)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+10
−17
ios/LChat/Views/ThreadRow.swift+10 −17
diff --git a/ios/LChat/Views/ThreadRow.swift b/ios/LChat/Views/ThreadRow.swift| index 8db7f32..f98e233 100644 |
| --- a/ios/LChat/Views/ThreadRow.swift |
| +++ b/ios/LChat/Views/ThreadRow.swift |
| @@ -29,23 +29,16 @@ struct ThreadRow: View { |
| } |
| } |
| } |
| - // No recent message → no ghost preview block, so the title |
| - // centres beside the avatar (the unread pip rides alone). |
| - if !thread.preview.isEmpty { |
| - HStack(spacing: 6) { |
| - // Up to two lines, height reserved so chatty rows stay |
| - // uniform (à la Mail/Messages) — the web's 2-line clamp. |
| - Text(thread.preview) |
| - .font(.subheadline).foregroundStyle(.secondary) |
| - .lineLimit(2, reservesSpace: true) |
| - Spacer() |
| - if thread.unread { |
| - Circle().fill(Color.accentColor).frame(width: 9, height: 9) |
| - } |
| - } |
| - } else if thread.unread { |
| - HStack { |
| - Spacer() |
| + // Always rendered, preview or not: two reserved lines keep |
| + // every row the same height (à la Mail/Messages — a list of |
| + // mixed heights read as jumbled next to app rows with no |
| + // recent message). The web keeps its 2-line clamp. |
| + HStack(spacing: 6) { |
| + Text(thread.preview) |
| + .font(.subheadline).foregroundStyle(.secondary) |
| + .lineLimit(2, reservesSpace: true) |
| + Spacer() |
| + if thread.unread { |
| Circle().fill(Color.accentColor).frame(width: 9, height: 9) |
| } |
| } |