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 {
|
if !item.controllerInteraction.canReadHistory {
|
||||||
isPlaying = false
|
canPlayEffects = false
|
||||||
}
|
}
|
||||||
|
|
||||||
if !isPlaying {
|
if !canPlayEffects {
|
||||||
self.removeAdditionalAnimations()
|
self.removeAdditionalAnimations()
|
||||||
self.removeEffectAnimations()
|
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
|
var effectAlreadySeen = true
|
||||||
if item.message.flags.contains(.Incoming) {
|
if item.message.flags.contains(.Incoming) {
|
||||||
if let unreadRange = item.controllerInteraction.unreadMessageRange[UnreadMessageRangeKey(peerId: item.message.id.peerId, namespace: item.message.id.namespace)] {
|
if let unreadRange = item.controllerInteraction.unreadMessageRange[UnreadMessageRangeKey(peerId: item.message.id.peerId, namespace: item.message.id.namespace)] {
|
||||||
|
@ -261,9 +261,9 @@ private func contentNodeMessagesAndClassesForItem(_ item: ChatMessageItem) -> ([
|
|||||||
result.insert((message, ChatMessageTextBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: isFile ? .condensed : .default)), at: 0)
|
result.insert((message, ChatMessageTextBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: isFile ? .condensed : .default)), at: 0)
|
||||||
} else {
|
} else {
|
||||||
result.append((message, ChatMessageTextBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: isFile ? .condensed : .default)))
|
result.append((message, ChatMessageTextBubbleContentNode.self, itemAttributes, BubbleItemAttributes(isAttachment: false, neighborType: .text, neighborSpacing: isFile ? .condensed : .default)))
|
||||||
}
|
|
||||||
needReactions = false
|
needReactions = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if case .group = item.content {
|
if case .group = item.content {
|
||||||
messageWithCaptionToAdd = nil
|
messageWithCaptionToAdd = nil
|
||||||
|
@ -166,6 +166,9 @@ public class ChatMessageTextBubbleContentNode: ChatMessageBubbleContentNode {
|
|||||||
guard let self else {
|
guard let self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cancelParentGestures(view: self.view)
|
||||||
|
|
||||||
var mappedLocation: CGPoint?
|
var mappedLocation: CGPoint?
|
||||||
if let location {
|
if let location {
|
||||||
mappedLocation = self.textNode.textNode.layer.convert(location, to: self.layer)
|
mappedLocation = self.textNode.textNode.layer.convert(location, to: self.layer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user