mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix animation
This commit is contained in:
parent
a98e69cfa0
commit
7338393c59
@ -1163,7 +1163,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
||||
if validLayout.inVoiceOver {
|
||||
offset = .known(0.0)
|
||||
}
|
||||
searchContentNode.updateListVisibleContentOffset(offset)
|
||||
searchContentNode.updateListVisibleContentOffset(offset, transition: strongSelf.chatListDisplayNode.temporaryContentOffsetChangeTransition ?? .immediate)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1162,6 +1162,7 @@ final class ChatListControllerNode: ASDisplayNode, UIGestureRecognizerDelegate {
|
||||
private(set) var inlineStackContainerTransitionFraction: CGFloat = 0.0
|
||||
private(set) var inlineStackContainerNode: ChatListContainerNode?
|
||||
private var inlineContentPanRecognizer: InteractiveTransitionGestureRecognizer?
|
||||
private(set) var temporaryContentOffsetChangeTransition: ContainedViewLayoutTransition?
|
||||
|
||||
private var tapRecognizer: UITapGestureRecognizer?
|
||||
var navigationBar: NavigationBar?
|
||||
@ -1687,7 +1688,9 @@ final class ChatListControllerNode: ASDisplayNode, UIGestureRecognizerDelegate {
|
||||
inlineStackContainerNode?.removeFromSupernode()
|
||||
})
|
||||
|
||||
self.temporaryContentOffsetChangeTransition = transition
|
||||
self.controller?.requestLayout(transition: transition)
|
||||
self.temporaryContentOffsetChangeTransition = nil
|
||||
} else {
|
||||
inlineStackContainerNode.removeFromSupernode()
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class NavigationBarSearchContentNode: NavigationBarContentNode {
|
||||
}
|
||||
}
|
||||
|
||||
public func updateListVisibleContentOffset(_ offset: ListViewVisibleContentOffset) {
|
||||
public func updateListVisibleContentOffset(_ offset: ListViewVisibleContentOffset, transition: ContainedViewLayoutTransition = .immediate) {
|
||||
var progress: CGFloat = 0.0
|
||||
switch offset {
|
||||
case let .known(offset):
|
||||
@ -64,7 +64,7 @@ public class NavigationBarSearchContentNode: NavigationBarContentNode {
|
||||
default:
|
||||
break
|
||||
}
|
||||
self.updateExpansionProgress(progress)
|
||||
self.updateExpansionProgress(progress, animated: transition.isAnimated)
|
||||
}
|
||||
|
||||
public func updateGridVisibleContentOffset(_ offset: GridNodeVisibleContentOffset) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user