Various improvements

This commit is contained in:
Ilya Laktyushin
2024-07-26 20:59:48 +02:00
parent 8e219193d0
commit 40d40dd8e7
24 changed files with 1117 additions and 970 deletions

View File

@@ -752,7 +752,12 @@ final class BrowserWebContent: UIView, BrowserContent, WKNavigationDelegate, WKU
func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? {
if navigationAction.targetFrame == nil {
if let url = navigationAction.request.url?.absoluteString {
self.open(url: url, new: true)
if isTelegramMeLink(url) || isTelegraPhLink(url) {
self.minimize()
self.openAppUrl(url)
} else {
self.open(url: url, new: true)
}
}
}
return nil