mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Input node improvements
This commit is contained in:
@@ -10,8 +10,8 @@ public extension Transition.Animation.Curve {
|
||||
self = .easeInOut
|
||||
case .easeInOut:
|
||||
self = .easeInOut
|
||||
case .custom:
|
||||
self = .spring
|
||||
case let .custom(a, b, c, d):
|
||||
self = .custom(a, b, c, d)
|
||||
case .customSpring:
|
||||
self = .spring
|
||||
case .spring:
|
||||
@@ -21,10 +21,12 @@ public extension Transition.Animation.Curve {
|
||||
|
||||
var containedViewLayoutTransitionCurve: ContainedViewLayoutTransitionCurve {
|
||||
switch self {
|
||||
case .easeInOut:
|
||||
return .easeInOut
|
||||
case .spring:
|
||||
return .spring
|
||||
case .easeInOut:
|
||||
return .easeInOut
|
||||
case .spring:
|
||||
return .spring
|
||||
case let .custom(a, b, c, d):
|
||||
return .custom(a, b, c, d)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,4 +49,4 @@ public extension Transition {
|
||||
return .animated(duration: duration, curve: curve.containedViewLayoutTransitionCurve)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,14 +532,13 @@ public final class PagerComponent<ChildEnvironmentType: Equatable>: Component {
|
||||
}
|
||||
|
||||
var removedIds: [AnyHashable] = []
|
||||
for (id, contentView) in self.contentViews {
|
||||
for (id, _) in self.contentViews {
|
||||
if !validIds.contains(id) {
|
||||
removedIds.append(id)
|
||||
contentView.view.removeFromSuperview()
|
||||
}
|
||||
}
|
||||
for id in removedIds {
|
||||
self.contentViews.removeValue(forKey: id)
|
||||
self.contentViews.removeValue(forKey: id)?.view.removeFromSuperview()
|
||||
}
|
||||
|
||||
if let panelStateUpdated = component.panelStateUpdated {
|
||||
|
||||
Reference in New Issue
Block a user