From c367a2e9f198c25052dc38ea18108a959678ad31 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 6 Jul 2024 10:19:09 -0700 Subject: [PATCH] Fix selecting poll option playing too much haptic feedback --- Tusker/Views/Poll/PollOptionsView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tusker/Views/Poll/PollOptionsView.swift b/Tusker/Views/Poll/PollOptionsView.swift index 431dfdedc2..2355e90d21 100644 --- a/Tusker/Views/Poll/PollOptionsView.swift +++ b/Tusker/Views/Poll/PollOptionsView.swift @@ -153,7 +153,8 @@ class PollOptionsView: UIControl { let location = touch.location(in: self) var newIndex: Int? = nil for (index, view) in options.enumerated() { - var frame = view.frame + // don't use view.frame because it changes when a transform is applied + var frame = CGRect(x: 0, y: view.center.y - view.bounds.height / 2, width: view.bounds.width, height: view.bounds.height) if index != options.count - 1 { frame = frame.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: -stack.spacing, right: 0)) }