mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Pretend input has accessory height
This commit is contained in:
parent
e70db49157
commit
d93babe719
@ -272,11 +272,7 @@ final class SetupTwoStepVerificationControllerNode: ViewControllerTracingNode {
|
||||
var insets = state.layout.layout.insets(options: [.statusBar])
|
||||
let visibleInsets = state.layout.layout.insets(options: [.statusBar, .input])
|
||||
if let inputHeight = state.layout.layout.inputHeight {
|
||||
if inputHeight.isEqual(to: state.layout.layout.standardInputHeight - 44.0) {
|
||||
insets.bottom += state.layout.layout.standardInputHeight
|
||||
} else {
|
||||
insets.bottom += inputHeight
|
||||
}
|
||||
insets.bottom += max(inputHeight, state.layout.layout.standardInputHeight)
|
||||
}
|
||||
let contentFrame = CGRect(origin: CGPoint(x: 0.0, y: 0.0), size: CGSize(width: state.layout.layout.size.width, height: state.layout.layout.size.height))
|
||||
if state.data.state?.kind != self.contentNode?.kind {
|
||||
|
@ -215,11 +215,7 @@ final class AuthorizationSequenceCodeEntryControllerNode: ASDisplayNode, UITextF
|
||||
insets.top = navigationBarHeight
|
||||
|
||||
if let inputHeight = layout.inputHeight {
|
||||
if abs(inputHeight - (layout.standardInputHeight - 44.0)) < 2.0 {
|
||||
insets.bottom += layout.standardInputHeight
|
||||
} else {
|
||||
insets.bottom += inputHeight
|
||||
}
|
||||
insets.bottom += max(inputHeight, layout.standardInputHeight)
|
||||
}
|
||||
|
||||
if max(layout.size.width, layout.size.height) > 1023.0 {
|
||||
|
@ -111,11 +111,7 @@ final class AuthorizationSequencePasswordEntryControllerNode: ASDisplayNode, UIT
|
||||
insets.top = navigationBarHeight
|
||||
|
||||
if let inputHeight = layout.inputHeight {
|
||||
if abs(inputHeight - (layout.standardInputHeight - 44.0)) < 2.0 {
|
||||
insets.bottom += layout.standardInputHeight
|
||||
} else {
|
||||
insets.bottom += inputHeight
|
||||
}
|
||||
insets.bottom += max(inputHeight, layout.standardInputHeight)
|
||||
}
|
||||
|
||||
if max(layout.size.width, layout.size.height) > 1023.0 {
|
||||
|
@ -297,12 +297,8 @@ final class AuthorizationSequencePhoneEntryControllerNode: ASDisplayNode {
|
||||
var insets = layout.insets(options: [])
|
||||
insets.top = navigationBarHeight
|
||||
|
||||
if let inputHeight = layout.inputHeight {
|
||||
if abs(inputHeight - (layout.standardInputHeight - 44.0)) < 2.0 {
|
||||
insets.bottom += layout.standardInputHeight
|
||||
} else {
|
||||
insets.bottom += inputHeight
|
||||
}
|
||||
if let inputHeight = layout.inputHeight, !inputHeight.isZero {
|
||||
insets.bottom += max(inputHeight, layout.standardInputHeight)
|
||||
}
|
||||
|
||||
if max(layout.size.width, layout.size.height) > 1023.0 {
|
||||
|
@ -191,11 +191,7 @@ final class AuthorizationSequenceSignUpControllerNode: ASDisplayNode, UITextFiel
|
||||
|
||||
var insets = layout.insets(options: [.statusBar])
|
||||
if let inputHeight = layout.inputHeight {
|
||||
if abs(inputHeight - (layout.standardInputHeight - 44.0)) < 2.0 {
|
||||
insets.bottom += layout.standardInputHeight
|
||||
} else {
|
||||
insets.bottom += inputHeight
|
||||
}
|
||||
insets.bottom += max(inputHeight, layout.standardInputHeight)
|
||||
}
|
||||
|
||||
let availableHeight = max(1.0, layout.size.height - insets.top - insets.bottom)
|
||||
|
Loading…
x
Reference in New Issue
Block a user