mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 11:23:48 +00:00
Improve toolbar (dis)appearance
This commit is contained in:
parent
ff1ff8acdc
commit
b55782a5d1
@ -5253,17 +5253,21 @@ extension ChatTextInputPanelNode {
|
||||
var toolbarSpacing: CGFloat = 0.0
|
||||
if let toolbarNode = self.toolbarNode {
|
||||
if displayBotStartButton {
|
||||
toolbarNode.view.isHidden = true
|
||||
toolbarNode.view.alpha = 0.0
|
||||
// transition.updateAlpha(node: toolbarNode, alpha: 0.0)
|
||||
/*} else if !self.isFocused {
|
||||
transition.updateAlpha(node: toolbarNode, alpha: 0.0, completion: { _ in
|
||||
toolbarNode.isHidden = true
|
||||
})*/
|
||||
} else {
|
||||
toolbarHeight = 44.0
|
||||
toolbarSpacing = 1.0
|
||||
// toolbarNode.isHidden = false
|
||||
transition.updateFrame(node: toolbarNode, frame: CGRect(origin: CGPoint(x: leftInset, y: panelHeight + toolbarSpacing), size: CGSize(width: width - rightInset - leftInset, height: toolbarHeight)))
|
||||
// transition.updateAlpha(node: toolbarNode, alpha: 1.0)
|
||||
if !self.isFocused {
|
||||
transition.updateAlpha(node: toolbarNode, alpha: 0.0)
|
||||
} else {
|
||||
toolbarHeight = 44.0
|
||||
toolbarSpacing = 1.0
|
||||
transition.updateFrame(node: toolbarNode, frame: CGRect(origin: CGPoint(x: leftInset, y: panelHeight + toolbarSpacing), size: CGSize(width: width - rightInset - leftInset, height: toolbarHeight)))
|
||||
transition.updateAlpha(node: toolbarNode, alpha: 1.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
return toolbarHeight + toolbarSpacing
|
||||
|
Loading…
x
Reference in New Issue
Block a user