mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Refactoring
This commit is contained in:
@@ -419,7 +419,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
private var currentState: (width: CGFloat, leftInset: CGFloat, rightInset: CGFloat, bottomInset: CGFloat, standardInputHeight: CGFloat, inputHeight: CGFloat, maximumHeight: CGFloat, inputPanelHeight: CGFloat, interfaceState: ChatPresentationInterfaceState, layoutMetrics: LayoutMetrics, deviceMetrics: DeviceMetrics, isVisible: Bool, isExpanded: Bool)?
|
||||
|
||||
private var scheduledContentAnimationHint: EmojiPagerContentComponent.ContentAnimation?
|
||||
private var scheduledInnerTransition: Transition?
|
||||
private var scheduledInnerTransition: ComponentTransition?
|
||||
|
||||
private var gifMode: GifPagerContentComponent.Subject? {
|
||||
didSet {
|
||||
@@ -1586,7 +1586,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
}
|
||||
}
|
||||
|
||||
var transition: Transition = .immediate
|
||||
var transition: ComponentTransition = .immediate
|
||||
var useAnimation = false
|
||||
|
||||
if let pagerView = strongSelf.entityKeyboardView.componentView as? EntityKeyboardComponent.View, let centralId = pagerView.centralId {
|
||||
@@ -1605,7 +1605,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
} else {
|
||||
contentAnimation = EmojiPagerContentComponent.ContentAnimation(type: .generic)
|
||||
}
|
||||
transition = Transition(animation: .curve(duration: 0.4, curve: .spring)).withUserData(contentAnimation)
|
||||
transition = ComponentTransition(animation: .curve(duration: 0.4, curve: .spring)).withUserData(contentAnimation)
|
||||
}
|
||||
strongSelf.currentInputData = strongSelf.processInputData(inputData: inputData)
|
||||
strongSelf.performLayout(transition: transition)
|
||||
@@ -1741,7 +1741,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
self.isMarkInputCollapsed = true
|
||||
}
|
||||
|
||||
private func performLayout(transition: Transition) {
|
||||
private func performLayout(transition: ComponentTransition) {
|
||||
guard let (width, leftInset, rightInset, bottomInset, standardInputHeight, inputHeight, maximumHeight, inputPanelHeight, interfaceState, layoutMetrics, deviceMetrics, isVisible, isExpanded) = self.currentState else {
|
||||
return
|
||||
}
|
||||
@@ -1759,12 +1759,12 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
public override func updateLayout(width: CGFloat, leftInset: CGFloat, rightInset: CGFloat, bottomInset: CGFloat, standardInputHeight: CGFloat, inputHeight: CGFloat, maximumHeight: CGFloat, inputPanelHeight: CGFloat, transition: ContainedViewLayoutTransition, interfaceState: ChatPresentationInterfaceState, layoutMetrics: LayoutMetrics, deviceMetrics: DeviceMetrics, isVisible: Bool, isExpanded: Bool) -> (CGFloat, CGFloat) {
|
||||
self.currentState = (width, leftInset, rightInset, bottomInset, standardInputHeight, inputHeight, maximumHeight, inputPanelHeight, interfaceState, layoutMetrics, deviceMetrics, isVisible, isExpanded)
|
||||
|
||||
let innerTransition: Transition
|
||||
let innerTransition: ComponentTransition
|
||||
if let scheduledInnerTransition = self.scheduledInnerTransition {
|
||||
self.scheduledInnerTransition = nil
|
||||
innerTransition = scheduledInnerTransition
|
||||
} else {
|
||||
innerTransition = Transition(transition)
|
||||
innerTransition = ComponentTransition(transition)
|
||||
}
|
||||
|
||||
let wasMarkedInputCollapsed = self.isMarkInputCollapsed
|
||||
@@ -2093,7 +2093,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
}
|
||||
strongSelf.performLayout(transition: Transition(animation: .curve(duration: 0.4, curve: .spring)))
|
||||
strongSelf.performLayout(transition: ComponentTransition(animation: .curve(duration: 0.4, curve: .spring)))
|
||||
})
|
||||
|
||||
if self.context.sharedContext.currentStickerSettings.with({ $0 }).dynamicPackOrder {
|
||||
|
||||
Reference in New Issue
Block a user