Various improvements

This commit is contained in:
Ilya Laktyushin
2022-04-30 03:52:31 +04:00
parent d36b6b0b7f
commit 70ae305e99
41 changed files with 521 additions and 415 deletions

View File

@@ -445,7 +445,7 @@ public final class WebAppController: ViewController, AttachmentContainable {
self.handleSendData(data: eventData)
}
case "web_app_setup_main_button":
if let webView = self.webView, !webView.didTouchOnce {
if let webView = self.webView, !webView.didTouchOnce && controller.url == nil {
self.delayedScriptMessage = message
} else if let eventData = (body["eventData"] as? String)?.data(using: .utf8), let json = try? JSONSerialization.jsonObject(with: eventData, options: []) as? [String: Any] {
if var isVisible = json["is_visible"] as? Bool {