@capgo/inappbrowser 7.6.8 → 7.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -368,6 +368,16 @@ public class InAppBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
368
368
|
return
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
+
if (self.bridge?.statusBarVisible == true) {
|
|
372
|
+
let subviews = self.bridge?.webView?.superview?.subviews
|
|
373
|
+
if let emptyStatusBarIndex = subviews?.firstIndex(where: { $0.subviews.isEmpty }) {
|
|
374
|
+
if let emptyStatusBar = subviews?[emptyStatusBarIndex] {
|
|
375
|
+
webViewController.capacitorStatusBar = emptyStatusBar
|
|
376
|
+
emptyStatusBar.removeFromSuperview()
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
371
381
|
webViewController.source = .remote(url)
|
|
372
382
|
webViewController.leftNavigationBarItemTypes = []
|
|
373
383
|
|
|
@@ -682,6 +692,16 @@ public class InAppBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
682
692
|
return
|
|
683
693
|
}
|
|
684
694
|
|
|
695
|
+
if (self.bridge?.statusBarVisible == true) {
|
|
696
|
+
let subviews = self.bridge?.webView?.superview?.subviews
|
|
697
|
+
if let emptyStatusBarIndex = subviews?.firstIndex(where: { $0.subviews.isEmpty }) {
|
|
698
|
+
if let emptyStatusBar = subviews?[emptyStatusBarIndex] {
|
|
699
|
+
webViewController.capacitorStatusBar = emptyStatusBar
|
|
700
|
+
emptyStatusBar.removeFromSuperview()
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
|
|
685
705
|
webViewController.source = .remote(url)
|
|
686
706
|
webViewController.leftNavigationBarItemTypes = [.back, .forward, .reload]
|
|
687
707
|
webViewController.capBrowserPlugin = self
|
|
@@ -112,6 +112,7 @@ open class WKWebViewController: UIViewController, WKScriptMessageHandler {
|
|
|
112
112
|
var viewWasPresented = false
|
|
113
113
|
var preventDeeplink: Bool = false
|
|
114
114
|
var blankNavigationTab: Bool = false
|
|
115
|
+
var capacitorStatusBar: UIView?
|
|
115
116
|
|
|
116
117
|
internal var preShowSemaphore: DispatchSemaphore?
|
|
117
118
|
internal var preShowError: String?
|
|
@@ -1179,6 +1180,10 @@ fileprivate extension WKWebViewController {
|
|
|
1179
1180
|
self.capBrowserPlugin?.notifyListeners("closeEvent", data: ["url": webView?.url?.absoluteString ?? ""])
|
|
1180
1181
|
dismiss(animated: true, completion: nil)
|
|
1181
1182
|
}
|
|
1183
|
+
if let capacitorStatusBar = capacitorStatusBar {
|
|
1184
|
+
capBrowserPlugin?.bridge?.webView?.addSubview(capacitorStatusBar)
|
|
1185
|
+
capBrowserPlugin?.bridge?.webView?.frame.origin.y = capacitorStatusBar.frame.height
|
|
1186
|
+
}
|
|
1182
1187
|
}
|
|
1183
1188
|
|
|
1184
1189
|
@objc func doneDidClick(sender: AnyObject) {
|