Web app improvements

This commit is contained in:
Ilya Laktyushin
2022-04-08 18:38:04 +04:00
parent 845cc48c61
commit af9dcd2f19
3 changed files with 35 additions and 18 deletions

View File

@@ -2565,13 +2565,13 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate {
return !value
}
} else if case let .webView(title, url) = presentationInterfaceState.botMenuButton {
var show = false
self.interfaceInteraction?.updateShowWebView { value in
show = !value
return show
}
if show {
let willShow = !(self.presentationInterfaceState?.showWebView ?? false)
if willShow {
self.interfaceInteraction?.openWebView(title, url, false, true)
} else {
self.interfaceInteraction?.updateShowWebView { _ in
return false
}
}
} else {
self.interfaceInteraction?.updateShowCommands { value in