Various UI fixes

This commit is contained in:
Ilya Laktyushin
2020-12-27 16:48:27 +04:00
parent ea83772c8d
commit 6ac7de030b
3 changed files with 15 additions and 8 deletions

View File

@@ -785,13 +785,14 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
self.addSubnode(self.recentListNode)
self.addSubnode(self.listNode)
self.addSubnode(self.mediaNode)
self.addSubnode(self.shimmerNode)
self.addSubnode(self.mediaAccessoryPanelContainer)
self.addSubnode(self.emptyResultsAnimationNode)
self.addSubnode(self.emptyResultsTitleNode)
self.addSubnode(self.emptyResultsTextNode)
self.addSubnode(self.shimmerNode)
self.addSubnode(self.mediaAccessoryPanelContainer)
let searchContext = Promise<ChatListSearchMessagesContext?>(nil)
let searchContextValue = self.searchContextValue
let updateSearchContext: ((ChatListSearchMessagesContext?) -> (ChatListSearchMessagesContext?, Bool)) -> Void = { f in

View File

@@ -242,13 +242,16 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
return
}
if image != nil {
strongSelf.removePlaceholder(animated: !firstTime)
if firstTime {
strongSelf.animationNode?.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
}
strongSelf.animationNode?.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.3, completion: { [weak self] _ in
self?.removePlaceholder(animated: false)
})
} else {
strongSelf.removePlaceholder(animated: true)
}
firstTime = false
}
}
self.imageNode.displaysAsynchronously = false
self.containerNode.addSubnode(self.contextSourceNode)

View File

@@ -64,13 +64,16 @@ class ChatMessageStickerItemNode: ChatMessageItemView {
return
}
if image != nil {
strongSelf.removePlaceholder(animated: !firstTime)
if firstTime {
strongSelf.imageNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
}
strongSelf.imageNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.3, completion: { [weak self] _ in
self?.removePlaceholder(animated: false)
})
} else {
strongSelf.removePlaceholder(animated: true)
}
firstTime = false
}
}
self.containerNode.shouldBegin = { [weak self] location in
guard let strongSelf = self else {