mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Improvements
This commit is contained in:
@@ -271,6 +271,18 @@ final class ChatSendMessageContextScreenComponent: Component {
|
||||
self.isUpdating = false
|
||||
}
|
||||
|
||||
let environment = environment[EnvironmentType.self].value
|
||||
|
||||
var transition = transition
|
||||
|
||||
var transitionIsImmediate = transition.animation.isImmediate
|
||||
if case let .curve(duration, _) = transition.animation, duration == 0.0 {
|
||||
transitionIsImmediate = true
|
||||
}
|
||||
if transitionIsImmediate, let previousEnvironment = self.environment, previousEnvironment.inputHeight != 0.0, environment.inputHeight != 0.0, previousEnvironment.inputHeight != environment.inputHeight {
|
||||
transition = .spring(duration: 0.4)
|
||||
}
|
||||
|
||||
let previousAnimationState = self.appliedAnimationState
|
||||
self.appliedAnimationState = self.presentationAnimationState
|
||||
|
||||
@@ -284,8 +296,6 @@ final class ChatSendMessageContextScreenComponent: Component {
|
||||
}
|
||||
let _ = alphaTransition
|
||||
|
||||
let environment = environment[EnvironmentType.self].value
|
||||
|
||||
let themeUpdated = environment.theme !== self.environment?.theme
|
||||
|
||||
if self.component == nil {
|
||||
|
||||
Reference in New Issue
Block a user