Various improvements

This commit is contained in:
Ilya Laktyushin
2024-10-19 20:24:02 +04:00
parent cc6f7882f1
commit 3fe6f7a069
36 changed files with 673 additions and 277 deletions

View File

@@ -91,6 +91,14 @@ function tgBrowserDisconnectObserver() {
final class WebAppWebView: WKWebView {
var handleScriptMessage: (WKScriptMessage) -> Void = { _ in }
var customSideInset: CGFloat = 0.0 {
didSet {
if self.customSideInset != oldValue {
self.setNeedsLayout()
}
}
}
var customBottomInset: CGFloat = 0.0 {
didSet {
@@ -101,7 +109,7 @@ final class WebAppWebView: WKWebView {
}
override var safeAreaInsets: UIEdgeInsets {
return UIEdgeInsets(top: 0.0, left: 0.0, bottom: self.customBottomInset, right: 0.0)
return UIEdgeInsets(top: 0.0, left: self.customSideInset, bottom: self.customBottomInset, right: self.customSideInset)
}
init(account: Account) {