Removed MessageText long press gesture recognizer (#1584)

This commit is contained in:
Mauro 2023-08-28 19:12:29 +02:00 committed by GitHub
parent 1e1923c9f4
commit 25db476fba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -18,13 +18,9 @@ import SwiftUI
import UIKit
final class MessageTextView: UITextView {
override func addGestureRecognizer(_ gestureRecognizer: UIGestureRecognizer) {
// Prevent long press to show the magnifying glass
if gestureRecognizer is UILongPressGestureRecognizer {
gestureRecognizer.isEnabled = false
}
super.addGestureRecognizer(gestureRecognizer)
// This prevents the magnifying glass from showing up
override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
gestureRecognizer as? UILongPressGestureRecognizer == nil
}
}

1
changelog.d/1581.bugfix Normal file
View File

@ -0,0 +1 @@
Fixed a bug that made a magnifying glass appear when long pressing a message.