Fix: scope task completion toggle to circle only

Wrapping the entire TaskRowView in a Button caused any tap on the row
to mark the task complete. Circle is now the only interactive element.

Co-Authored-By: Kutesir <tqwyy79vzn@privaterelay.appleid.com>
This commit is contained in:
Robin Kutesa
2026-06-01 02:37:54 +03:00
parent 43fb8f7036
commit 3bc63119ee

View File

@@ -978,8 +978,8 @@ struct TaskRowView: View {
}()
var body: some View {
Button(action: onToggle) {
HStack(spacing: 10) {
Button(action: onToggle) {
ZStack {
Circle()
.fill(task.taskColor.soft())
@@ -990,6 +990,9 @@ struct TaskRowView: View {
}
.frame(width: 36, height: 44)
.padding(.leading, 4)
.contentShape(Circle())
}
.buttonStyle(PressButtonStyle(scale: 0.82))
VStack(alignment: .leading, spacing: 2) {
Text(task.title)
@@ -1029,9 +1032,6 @@ struct TaskRowView: View {
.clipShape(RoundedRectangle(cornerRadius: AppRadius.small))
.overlay(RoundedRectangle(cornerRadius: AppRadius.small)
.stroke(AppColors.border(cs), lineWidth: 1))
.contentShape(Rectangle())
}
.buttonStyle(PressButtonStyle())
}
private func countdownLabel(to date: Date) -> String {