Fix haptic delay when sharing to saved messages

This commit is contained in:
Ilya Laktyushin
2023-02-02 03:17:45 +04:00
parent b8f0bb1620
commit 824e887294
6 changed files with 35 additions and 27 deletions

View File

@@ -876,7 +876,14 @@ final class ShareControllerNode: ViewControllerTracingNode, UIScrollViewDelegate
})
self.completed?(peerIds)
Queue.mainQueue().after(0.44) {
let delay: Double
if let peerId = peerIds.first, peerIds.count == 1 && peerId == self.context?.account.peerId {
delay = 0.88
} else {
delay = 0.44
}
Queue.mainQueue().after(delay) {
if self.hapticFeedback == nil {
self.hapticFeedback = HapticFeedback()
}