@capgo/capacitor-inappbrowser 8.7.8 → 8.7.10

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.
@@ -62,7 +62,7 @@ final class ProxyRequestSupport {
62
62
  private ProxyRequestSupport() {}
63
63
 
64
64
  static boolean shouldInjectBridge(Options options) {
65
- return options != null && usesLegacyJsProxyMode(options);
65
+ return usesLegacyJsProxyMode(options);
66
66
  }
67
67
 
68
68
  static boolean usesLegacyJsProxyMode(Options options) {
@@ -98,7 +98,7 @@ public class CapgoInAppBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
98
98
  case aware = "AWARE"
99
99
  case fakeVisible = "FAKE_VISIBLE"
100
100
  }
101
- private let pluginVersion: String = "8.7.8"
101
+ private let pluginVersion: String = "8.7.10"
102
102
  public let identifier = "CapgoInAppBrowserPlugin"
103
103
  public let jsName = "CapgoInAppBrowser"
104
104
  public let pluginMethods: [CAPPluginMethod] = [
@@ -2218,6 +2218,12 @@ open class WKWebViewController: UIViewController, WKScriptMessageHandler {
2218
2218
  return self.capableWebView
2219
2219
  }
2220
2220
 
2221
+ private func applyNavigationVisibility() {
2222
+ navigationController?.setNavigationBarHidden(blankNavigationTab, animated: false)
2223
+ // Always hide toolbar since we never want it.
2224
+ navigationController?.setToolbarHidden(true, animated: false)
2225
+ }
2226
+
2221
2227
  override open func viewWillAppear(_ animated: Bool) {
2222
2228
  super.viewWillAppear(animated)
2223
2229
  if !self.viewWasPresented {
@@ -2229,6 +2235,9 @@ open class WKWebViewController: UIViewController, WKScriptMessageHandler {
2229
2235
  applyCustomDimensions()
2230
2236
  }
2231
2237
 
2238
+ // Reapply presentation state after hide/show re-presents the same controller.
2239
+ applyNavigationVisibility()
2240
+
2232
2241
  // Force update button appearances
2233
2242
  updateButtonTintColors()
2234
2243
 
@@ -2676,11 +2685,7 @@ fileprivate extension WKWebViewController {
2676
2685
  }
2677
2686
 
2678
2687
  func setUpState() {
2679
- navigationController?.setNavigationBarHidden(blankNavigationTab, animated: false)
2680
-
2681
- // Always hide toolbar since we never want it
2682
- navigationController?.setToolbarHidden(true, animated: false)
2683
-
2688
+ applyNavigationVisibility()
2684
2689
  // Set tint colors but don't override specific colors
2685
2690
  if tintColor == nil {
2686
2691
  // Use system appearance if no specific tint color is set
@@ -2700,7 +2705,10 @@ fileprivate extension WKWebViewController {
2700
2705
 
2701
2706
  navigationController?.navigationBar.tintColor = previousNavigationBarState.tintColor
2702
2707
 
2703
- navigationController?.setNavigationBarHidden(previousNavigationBarState.hidden, animated: true)
2708
+ navigationController?.setNavigationBarHidden(
2709
+ blankNavigationTab || previousNavigationBarState.hidden,
2710
+ animated: true
2711
+ )
2704
2712
  }
2705
2713
 
2706
2714
  func checkRequestCookies(_ request: URLRequest, cookies: [HTTPCookie]) -> Bool {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-inappbrowser",
3
- "version": "8.7.8",
3
+ "version": "8.7.10",
4
4
  "description": "Capacitor plugin in app browser",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",