mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Media-related improvements
This commit is contained in:
@@ -153,6 +153,17 @@ public struct Transition {
|
||||
return result
|
||||
}
|
||||
|
||||
public func withAnimationIfAnimated(_ animation: Animation) -> Transition {
|
||||
switch self.animation {
|
||||
case .none:
|
||||
return self
|
||||
default:
|
||||
var result = self
|
||||
result.animation = animation
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
public static var immediate: Transition = Transition(animation: .none)
|
||||
|
||||
public static func easeInOut(duration: Double) -> Transition {
|
||||
|
||||
Reference in New Issue
Block a user