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

@@ -16072,6 +16072,10 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
strongSelf.searchResultsController = nil
strongController.dismiss()
} else if peerId == strongSelf.context.account.peerId {
Queue.mainQueue().after(0.88) {
strongSelf.chatDisplayNode.hapticFeedback.success()
}
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: true, action: { [weak self] value in
if case .info = value, let strongSelf = self {