mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix animations
This commit is contained in:
parent
eb77e468f4
commit
8a1d228fba
@ -592,7 +592,11 @@ public class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
}
|
||||
}
|
||||
|
||||
let isPlaying = self.visibilityStatus == true && !self.forceStopAnimations
|
||||
var isPlaying = self.visibilityStatus == true && !self.forceStopAnimations
|
||||
if !item.controllerInteraction.canReadHistory {
|
||||
isPlaying = false
|
||||
}
|
||||
|
||||
if !isPlaying {
|
||||
self.removeAdditionalAnimations()
|
||||
self.removeEffectAnimations()
|
||||
|
@ -5936,6 +5936,9 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
|
||||
} else {
|
||||
isPlaying = false
|
||||
}
|
||||
if !item.controllerInteraction.canReadHistory {
|
||||
isPlaying = false
|
||||
}
|
||||
|
||||
if !isPlaying {
|
||||
self.removeEffectAnimations()
|
||||
|
@ -2156,6 +2156,9 @@ public class ChatMessageStickerItemNode: ChatMessageItemView {
|
||||
} else {
|
||||
isPlaying = false
|
||||
}
|
||||
if !item.controllerInteraction.canReadHistory {
|
||||
isPlaying = false
|
||||
}
|
||||
|
||||
if !isPlaying {
|
||||
self.removeEffectAnimations()
|
||||
|
@ -293,6 +293,7 @@ public final class ChatControllerInteraction: ChatControllerInteractionProtocol
|
||||
public var recommendedChannelsOpenUp: Bool = false
|
||||
public var enableFullTranslucency: Bool = true
|
||||
public var chatIsRotated: Bool = true
|
||||
public var canReadHistory: Bool = false
|
||||
|
||||
public init(
|
||||
openMessage: @escaping (Message, OpenMessageParams) -> Bool,
|
||||
|
@ -2121,6 +2121,7 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
||||
if let strongSelf = self {
|
||||
if strongSelf.canReadHistoryValue != value {
|
||||
strongSelf.canReadHistoryValue = value
|
||||
strongSelf.controllerInteraction.canReadHistory = value
|
||||
strongSelf.updateReadHistoryActions()
|
||||
|
||||
if strongSelf.canReadHistoryValue && !strongSelf.suspendReadingReactions && !strongSelf.messageIdsScheduledForMarkAsSeen.isEmpty {
|
||||
@ -2189,6 +2190,12 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto
|
||||
self.messageIdsWithReactionsScheduledForMarkAsSeen.removeAll()
|
||||
self.context.account.viewTracker.updateMarkReactionsSeenForMessageIds(messageIds: messageIds)
|
||||
}
|
||||
|
||||
if self.canReadHistoryValue {
|
||||
self.forEachVisibleMessageItemNode { itemNode in
|
||||
itemNode.unreadMessageRangeUpdated()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func takeGenericReactionEffect() -> String? {
|
||||
|
Loading…
x
Reference in New Issue
Block a user