mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
EC: handle back navigation from the webview
EC: remove native header updated element call to 0.13.0-rc1
This commit is contained in:
@@ -56,6 +56,8 @@ enum CallScreenJavaScriptMessageName: String, CaseIterable {
|
||||
case showNativeOutputDevicePicker
|
||||
/// Used to determine if the webview has selected the earpiece or not.
|
||||
case onOutputDeviceSelect
|
||||
/// Used to handle the webview back button
|
||||
case onBackButtonPressed
|
||||
|
||||
private var postMessageScript: String {
|
||||
switch self {
|
||||
@@ -87,6 +89,12 @@ enum CallScreenJavaScriptMessageName: String, CaseIterable {
|
||||
window.webkit.messageHandlers.\(rawValue).postMessage(id);
|
||||
};
|
||||
"""
|
||||
case .onBackButtonPressed:
|
||||
"""
|
||||
window.controls.\(rawValue) = () => {
|
||||
window.webkit.messageHandlers.\(rawValue).postMessage("");
|
||||
}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user