mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various improvements
This commit is contained in:
parent
a2dfe5c75d
commit
53fe1718e9
@ -592,12 +592,14 @@ public class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
}
|
||||
}
|
||||
|
||||
var isPlaying = self.visibilityStatus == true && !self.forceStopAnimations
|
||||
let isPlaying = self.visibilityStatus == true && !self.forceStopAnimations
|
||||
|
||||
var canPlayEffects = isPlaying
|
||||
if !item.controllerInteraction.canReadHistory {
|
||||
isPlaying = false
|
||||
canPlayEffects = false
|
||||
}
|
||||
|
||||
if !isPlaying {
|
||||
if !canPlayEffects {
|
||||
self.removeAdditionalAnimations()
|
||||
self.removeEffectAnimations()
|
||||
}
|
||||
@ -630,7 +632,7 @@ public class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
}
|
||||
}
|
||||
|
||||
if isPlaying, let animationNode = self.animationNode as? AnimatedStickerNode {
|
||||
if canPlayEffects, let animationNode = self.animationNode as? AnimatedStickerNode {
|
||||
var effectAlreadySeen = true
|
||||
if item.message.flags.contains(.Incoming) {
|
||||
if let unreadRange = item.controllerInteraction.unreadMessageRange[UnreadMessageRangeKey(peerId: item.message.id.peerId, namespace: item.message.id.namespace)] {
|
||||
|
@ -261,8 +261,8 @@ private func contentNodeMessagesAndClassesForItem(_ item: ChatMessageItem) -> ([
|
||||
result.insert((message, ChatMessageTextBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: isFile ? .condensed : .default)), at: 0)
|
||||
} else {
|
||||
result.append((message, ChatMessageTextBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: isFile ? .condensed : .default)))
|
||||
needReactions = false
|
||||
}
|
||||
needReactions = false
|
||||
}
|
||||
} else {
|
||||
if case .group = item.content {
|
||||
|
@ -166,6 +166,9 @@ public class ChatMessageTextBubbleContentNode: ChatMessageBubbleContentNode {
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
|
||||
cancelParentGestures(view: self.view)
|
||||
|
||||
var mappedLocation: CGPoint?
|
||||
if let location {
|
||||
mappedLocation = self.textNode.textNode.layer.convert(location, to: self.layer)
|
||||
|
Loading…
x
Reference in New Issue
Block a user