mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Fix haptic feedback
This commit is contained in:
parent
089ef27b69
commit
a25e41ff73
@ -34,32 +34,11 @@ private final class HapticFeedbackImpl {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
private lazy var selectionGenerator: UISelectionFeedbackGenerator? = {
|
private lazy var selectionGenerator: UISelectionFeedbackGenerator? = {
|
||||||
let generator = UISelectionFeedbackGenerator()
|
return UISelectionFeedbackGenerator()
|
||||||
generator.prepare()
|
|
||||||
var string = generator.debugDescription
|
|
||||||
string.removeLast()
|
|
||||||
let number = string.suffix(1)
|
|
||||||
if number == "1" {
|
|
||||||
return generator
|
|
||||||
} else {
|
|
||||||
if #available(iOSApplicationExtension 13.0, iOS 13.0, *) {
|
|
||||||
return generator
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
private lazy var notificationGenerator: UINotificationFeedbackGenerator? = {
|
private lazy var notificationGenerator: UINotificationFeedbackGenerator? = {
|
||||||
let generator = UINotificationFeedbackGenerator()
|
return UINotificationFeedbackGenerator()
|
||||||
generator.prepare()
|
|
||||||
var string = generator.debugDescription
|
|
||||||
string.removeLast()
|
|
||||||
let number = string.suffix(1)
|
|
||||||
if number == "1" {
|
|
||||||
return generator
|
|
||||||
} else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
func prepareTap() {
|
func prepareTap() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user