Added votes tooltips on polls

Added track switching on panel swipes
This commit is contained in:
Ilya Laktyushin
2019-04-06 23:48:24 +04:00
parent 6c5a7dbcfe
commit 8fbcfd0e88
16 changed files with 754 additions and 698 deletions

View File

@@ -257,7 +257,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView {
break
case .ignore:
return .fail
case .url, .peerMention, .textMention, .botCommand, .hashtag, .instantPage, .wallpaper, .call, .openMessage, .timecode:
case .url, .peerMention, .textMention, .botCommand, .hashtag, .instantPage, .wallpaper, .call, .openMessage, .timecode, .tooltip:
return .waitForSingleTap
}
}
@@ -1761,6 +1761,12 @@ class ChatMessageBubbleItemNode: ChatMessageItemView {
item.controllerInteraction.seekToTimecode(mediaMessage, timecode, forceOpen)
}
break loop
case let .tooltip(text, node, rect):
foundTapAction = true
if let item = self.item {
let _ = item.controllerInteraction.displayMessageTooltip(item.message.id, text, node, rect)
}
break loop
}
}
if !foundTapAction {
@@ -1819,6 +1825,8 @@ class ChatMessageBubbleItemNode: ChatMessageItemView {
item.controllerInteraction.longTap(.timecode(timecode, text), mediaMessage)
}
break loop
case .tooltip:
break
}
}
if !foundTapAction, let tapMessage = tapMessage {