mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix avatar icon animation
This commit is contained in:
parent
bc891d5975
commit
3495687655
@ -924,6 +924,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
private var customAnimationInProgress: Bool = false
|
||||
|
||||
private var onlineIsVoiceChat: Bool = false
|
||||
private var currentOnline: Bool?
|
||||
|
||||
override var canBeSelected: Bool {
|
||||
if self.selectableControlNode != nil || self.item?.editing == true {
|
||||
@ -2464,6 +2465,12 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
strongSelf.cachedChatListSearchResult = chatListSearchResult
|
||||
strongSelf.onlineIsVoiceChat = onlineIsVoiceChat
|
||||
|
||||
var animateOnline = animateOnline
|
||||
if let currentOnline = strongSelf.currentOnline, currentOnline == online {
|
||||
animateOnline = false
|
||||
}
|
||||
strongSelf.currentOnline = online
|
||||
|
||||
if let currentHiddenOffset = currentItem?.hiddenOffset, item.hiddenOffset, currentHiddenOffset != item.hiddenOffset {
|
||||
strongSelf.supernode?.insertSubnode(strongSelf, at: 0)
|
||||
}
|
||||
@ -2773,6 +2780,9 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
||||
if let autoremoveTimeout = autoremoveTimeout {
|
||||
let avatarTimerBadge: AvatarBadgeView
|
||||
var avatarTimerTransition = transition
|
||||
if !avatarTimerTransition.isAnimated, animateOnline {
|
||||
avatarTimerTransition = .animated(duration: 0.3, curve: .spring)
|
||||
}
|
||||
if let current = strongSelf.avatarTimerBadge {
|
||||
avatarTimerBadge = current
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user