mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Web app improvements
This commit is contained in:
@@ -126,8 +126,9 @@ final class WebAppWebView: WKWebView {
|
||||
})
|
||||
}
|
||||
|
||||
func updateFrame(frame: CGRect, transition: ContainedViewLayoutTransition) {
|
||||
self.sendEvent(name: "viewport_changed", data: "{height:\(frame.height)}")
|
||||
func updateMetrics(height: CGFloat, isExpanded: Bool, isStable: Bool, transition: ContainedViewLayoutTransition) {
|
||||
let data = "{height:\(height), is_expanded:\(isExpanded ? "true" : "false"), is_stable_state:\(isStable ? "true" : "false")}"
|
||||
self.sendEvent(name: "viewport_changed", data: data)
|
||||
}
|
||||
|
||||
private(set) var didTouchOnce = false
|
||||
|
||||
Reference in New Issue
Block a user