ios: make the whole row tappable in New chat / New group (#258)
A .plain button only hit-tests its label's opaque content, so the Spacer and row padding were dead zones: starting a DM needed a tap exactly on the name, and group selection only worked on the radio circles. contentShape(Rectangle()) makes the full row the tap target. Verified on device (iPhone 16 Pro).
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+7
−0
ios/LChat/Views/NewChatView.swift+7 −0
diff --git a/ios/LChat/Views/NewChatView.swift b/ios/LChat/Views/NewChatView.swift| index f633a17..594b476 100644 |
| --- a/ios/LChat/Views/NewChatView.swift |
| +++ b/ios/LChat/Views/NewChatView.swift |
| @@ -70,6 +70,9 @@ struct NewChatView: View { |
| Spacer() |
| if busyWith == person.user_id { ProgressView() } |
| } |
| + // A .plain button only hit-tests its label's opaque content — the |
| + // Spacer and row padding were dead zones. Make the whole row tappable. |
| + .contentShape(Rectangle()) |
| } |
| .buttonStyle(.plain) |
| .disabled(busyWith != nil) |
| @@ -123,6 +126,10 @@ struct NewGroupView: View { |
| Image(systemName: "circle").foregroundStyle(.tertiary) |
| } |
| } |
| + // Same as personRow: without an explicit content shape only |
| + // the glyphs hit-test, so selecting felt like tapping radio |
| + // buttons. The whole row should toggle. |
| + .contentShape(Rectangle()) |
| } |
| .buttonStyle(.plain) |
| } |