@capgo/inappbrowser 1.3.15 → 1.3.17

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.
@@ -58,7 +58,6 @@ dependencies {
58
58
  androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
59
59
  implementation "androidx.browser:browser:$androidxBrowserVersion"
60
60
  implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
61
- implementation 'com.google.android.material:material:1.10.0'
61
+ implementation 'com.google.android.material:material:1.9.0'
62
62
  implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
63
- implementation 'com.google.android.material:material:1.10.0'
64
63
  }
@@ -360,12 +360,12 @@ public class InAppBrowserPlugin
360
360
 
361
361
  @PluginMethod
362
362
  public void close(PluginCall call) {
363
- if (webViewDialog != null) {
364
- this.getActivity()
365
- .runOnUiThread(
366
- new Runnable() {
367
- @Override
368
- public void run() {
363
+ this.getActivity()
364
+ .runOnUiThread(
365
+ new Runnable() {
366
+ @Override
367
+ public void run() {
368
+ if (webViewDialog != null) {
369
369
  notifyListeners(
370
370
  "closeEvent",
371
371
  new JSObject().put("url", webViewDialog.getUrl())
@@ -373,18 +373,18 @@ public class InAppBrowserPlugin
373
373
  webViewDialog.dismiss();
374
374
  webViewDialog.destroy();
375
375
  webViewDialog = null;
376
+ } else {
377
+ Intent intent = new Intent(
378
+ getContext(),
379
+ getBridge().getActivity().getClass()
380
+ );
381
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
382
+ getContext().startActivity(intent);
376
383
  }
384
+ call.resolve();
377
385
  }
378
- );
379
- } else {
380
- Intent intent = new Intent(
381
- getContext(),
382
- getBridge().getActivity().getClass()
386
+ }
383
387
  );
384
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
385
- getContext().startActivity(intent);
386
- }
387
- call.resolve();
388
388
  }
389
389
 
390
390
  private Bundle getHeaders(PluginCall pluginCall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/inappbrowser",
3
- "version": "1.3.15",
3
+ "version": "1.3.17",
4
4
  "description": "Capacitor plugin in app browser",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",