mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Animated emoji improvements
This commit is contained in:
@@ -261,6 +261,10 @@ public final class PagerComponent<ChildEnvironmentType: Equatable, TopPanelEnvir
|
||||
|
||||
private var isTopPanelExpanded: Bool = false
|
||||
|
||||
public var topPanelComponentView: UIView? {
|
||||
return self.topPanelView?.componentView
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
|
||||
@@ -774,6 +778,14 @@ public final class PagerComponent<ChildEnvironmentType: Equatable, TopPanelEnvir
|
||||
|
||||
self.component?.isTopPanelExpandedUpdated(self.isTopPanelExpanded, transition)
|
||||
}
|
||||
|
||||
public func collapseTopPanel() {
|
||||
if !self.isTopPanelExpanded {
|
||||
return
|
||||
}
|
||||
|
||||
self.isTopPanelExpandedUpdated(isExpanded: false, transition: Transition(animation: .curve(duration: 0.4, curve: .spring)))
|
||||
}
|
||||
}
|
||||
|
||||
public func makeView() -> View {
|
||||
|
||||
Reference in New Issue
Block a user