From 75f0d12c829799ab3e963a352e1af475b84e0ed3 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 1 Jun 2024 10:47:56 -0700 Subject: [PATCH] Fix incorrect pointer actions on conversation main status Closes #493 --- .../Status/ConversationMainStatusCollectionViewCell.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift b/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift index 8e67d528a9..549ff6d44a 100644 --- a/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift +++ b/Tusker/Views/Status/ConversationMainStatusCollectionViewCell.swift @@ -640,7 +640,7 @@ extension ConversationMainStatusCollectionViewCell: UIPointerInteractionDelegate return defaultRegion } else if let button = interaction.view as? UIButton, actionButtons.contains(button) { - var rect = button.convert(button.imageView!.bounds, to: button.imageView!) + var rect = button.convert(button.imageView!.bounds, from: button.imageView!) rect = rect.insetBy(dx: -24, dy: -24) return UIPointerRegion(rect: rect) } @@ -654,8 +654,8 @@ extension ConversationMainStatusCollectionViewCell: UIPointerInteractionDelegate } else if let button = interaction.view as? UIButton, actionButtons.contains(button) { let preview = UITargetedPreview(view: button.imageView!) - var rect = button.convert(button.imageView!.bounds, to: button.imageView!) - rect = rect.insetBy(dx: -24, dy: -24) + var rect = button.convert(button.imageView!.bounds, from: button.imageView!) + rect = rect.insetBy(dx: -8, dy: -8) return UIPointerStyle(effect: .highlight(preview), shape: .roundedRect(rect)) } return nil