mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-24 11:56:18 +02:00
4647310322
Based on Swiftgram 12.5 (Telegram iOS 12.5). All GLEGram features ported and organized in GLEGram/ folder. Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass, Font Replacement, Fake Profile, Chat Export, Plugin System, and more. See CHANGELOG_12.5.md for full details.
43 lines
1.7 KiB
Swift
43 lines
1.7 KiB
Swift
import Foundation
|
|
import Display
|
|
import ChatControllerInteraction
|
|
import AccountContext
|
|
|
|
extension ChatControllerImpl {
|
|
func openLinkLongTap(_ action: ChatControllerInteractionLongTapAction, params: ChatControllerInteraction.LongTapParams?) {
|
|
if self.presentationInterfaceState.interfaceState.selectionState != nil {
|
|
return
|
|
}
|
|
|
|
self.dismissAllTooltips()
|
|
|
|
(self.view.window as? WindowHost)?.cancelInteractiveKeyboardGestures()
|
|
self.chatDisplayNode.cancelInteractiveKeyboardGestures()
|
|
self.chatDisplayNode.messageTransitionNode.dismissMessageReactionContexts()
|
|
|
|
guard let params else {
|
|
return
|
|
}
|
|
switch action {
|
|
case let .url(url):
|
|
self.openLinkContextMenu(url: url, params: params)
|
|
case let .mention(mention):
|
|
self.openMentionContextMenu(username: mention, peerId: nil, params: params)
|
|
case let .peerMention(peerId, mention):
|
|
self.openMentionContextMenu(username: mention, peerId: peerId, params: params)
|
|
case let .command(command):
|
|
self.openCommandContextMenu(command: command, params: params)
|
|
case let .hashtag(hashtag):
|
|
self.openHashtagContextMenu(hashtag: hashtag, params: params)
|
|
case let .timecode(value, timecode):
|
|
self.openTimecodeContextMenu(timecode: timecode, value: value, params: params)
|
|
case let .bankCard(number):
|
|
self.openBankCardContextMenu(number: number, params: params)
|
|
case let .phone(number):
|
|
self.openPhoneContextMenu(number: number, params: params)
|
|
case let .date(date):
|
|
self.openDateContextMenu(date: date, params: params)
|
|
}
|
|
}
|
|
}
|