@capgo/capacitor-inappbrowser 8.7.1 → 8.7.2

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.
@@ -26,19 +26,32 @@ final class SafeAreaInsetsSupport {
26
26
  boolean applyFallbackWhenZero
27
27
  ) {
28
28
  int inset = resolveSafeBottomInset(systemBarsBottom, navigationBarsBottom, systemGesturesBottom, mandatoryGesturesBottom);
29
- if (inset > 0 || !applyFallbackWhenZero || fallbackBottomInset <= 0) {
29
+ if (!applyFallbackWhenZero || fallbackBottomInset <= 0) {
30
30
  return inset;
31
31
  }
32
32
 
33
- if (hasSideNavigationBarInsets(systemBarsLeft, systemBarsRight, navigationBarsLeft, navigationBarsRight)) {
34
- return 0;
33
+ if (hasSideNavigationBarInsets(systemBarsLeft, systemBarsRight, navigationBarsLeft, navigationBarsRight, fallbackBottomInset)) {
34
+ return inset;
35
35
  }
36
36
 
37
- return fallbackBottomInset;
37
+ return Math.max(inset, fallbackBottomInset);
38
38
  }
39
39
 
40
- static boolean hasSideNavigationBarInsets(int systemBarsLeft, int systemBarsRight, int navigationBarsLeft, int navigationBarsRight) {
41
- return systemBarsLeft > 0 || systemBarsRight > 0 || navigationBarsLeft > 0 || navigationBarsRight > 0;
40
+ static boolean hasSideNavigationBarInsets(
41
+ int systemBarsLeft,
42
+ int systemBarsRight,
43
+ int navigationBarsLeft,
44
+ int navigationBarsRight,
45
+ int minSideNavBarInset
46
+ ) {
47
+ if (minSideNavBarInset <= 0) {
48
+ return false;
49
+ }
50
+
51
+ return (
52
+ Math.max(systemBarsLeft, navigationBarsLeft) >= minSideNavBarInset ||
53
+ Math.max(systemBarsRight, navigationBarsRight) >= minSideNavBarInset
54
+ );
42
55
  }
43
56
 
44
57
  static int resolveBottomMargin(boolean enabledSafeBottomMargin, int safeBottomInset, int imeBottom) {
@@ -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.1"
101
+ private let pluginVersion: String = "8.7.2"
102
102
  public let identifier = "CapgoInAppBrowserPlugin"
103
103
  public let jsName = "CapgoInAppBrowser"
104
104
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-inappbrowser",
3
- "version": "8.7.1",
3
+ "version": "8.7.2",
4
4
  "description": "Capacitor plugin in app browser",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",