@capgo/inappbrowser 7.3.0 → 7.3.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.
|
@@ -145,13 +145,10 @@ public class WebViewDialog extends Dialog {
|
|
|
145
145
|
if (activity != null) {
|
|
146
146
|
activity.runOnUiThread(() -> {
|
|
147
147
|
try {
|
|
148
|
+
String currentUrl = _webView != null ? _webView.getUrl() : "";
|
|
148
149
|
dismiss();
|
|
149
|
-
if (
|
|
150
|
-
|
|
151
|
-
if (_options != null && _options.getCallbacks() != null) {
|
|
152
|
-
_options.getCallbacks().closeEvent(currentUrl);
|
|
153
|
-
}
|
|
154
|
-
_webView.destroy();
|
|
150
|
+
if (_options != null && _options.getCallbacks() != null) {
|
|
151
|
+
_options.getCallbacks().closeEvent(currentUrl);
|
|
155
152
|
}
|
|
156
153
|
} catch (Exception e) {
|
|
157
154
|
Log.e("InAppBrowser", "Error closing WebView: " + e.getMessage());
|
|
@@ -551,18 +548,24 @@ public class WebViewDialog extends Dialog {
|
|
|
551
548
|
new OnClickListener() {
|
|
552
549
|
public void onClick(DialogInterface dialog, int which) {
|
|
553
550
|
// Close button clicked, do something
|
|
551
|
+
String currentUrl = _webView != null
|
|
552
|
+
? _webView.getUrl()
|
|
553
|
+
: "";
|
|
554
554
|
dismiss();
|
|
555
|
-
_options.getCallbacks()
|
|
556
|
-
|
|
555
|
+
if (_options != null && _options.getCallbacks() != null) {
|
|
556
|
+
_options.getCallbacks().closeEvent(currentUrl);
|
|
557
|
+
}
|
|
557
558
|
}
|
|
558
559
|
}
|
|
559
560
|
)
|
|
560
561
|
.setNegativeButton(_options.getCloseModalCancel(), null)
|
|
561
562
|
.show();
|
|
562
563
|
} else {
|
|
564
|
+
String currentUrl = _webView != null ? _webView.getUrl() : "";
|
|
563
565
|
dismiss();
|
|
564
|
-
_options.getCallbacks()
|
|
565
|
-
|
|
566
|
+
if (_options != null && _options.getCallbacks() != null) {
|
|
567
|
+
_options.getCallbacks().closeEvent(currentUrl);
|
|
568
|
+
}
|
|
566
569
|
}
|
|
567
570
|
}
|
|
568
571
|
}
|