mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various improvements
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user