@hanwha-ss1/plugin 0.4.5 → 0.4.7
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.
|
@@ -119,17 +119,6 @@ public class WebViewActivity extends AppCompatActivity {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
webView.setWebViewClient(new WebViewClient(){
|
|
125
|
-
@Override
|
|
126
|
-
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
|
127
|
-
if(url.startsWith("close://")){
|
|
128
|
-
WebViewActivity.this.finish();
|
|
129
|
-
}
|
|
130
|
-
return super.shouldOverrideUrlLoading(view, url);
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
122
|
}
|
|
134
123
|
|
|
135
124
|
private void openUrl(String url) {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
public class EdgeSwipePlugin: CAPPlugin {
|
|
5
|
+
private let implementation = EdgeSwipeService()
|
|
6
|
+
|
|
7
|
+
@objc public func onEdgeSwipe(_ call: CAPPluginCall, _bridge: CAPBridgeProtocol) {
|
|
8
|
+
let isOn = call.getBool("on") ?? false
|
|
9
|
+
|
|
10
|
+
DispatchQueue.main.async {
|
|
11
|
+
if let webView = _bridge.webView {
|
|
12
|
+
webView.allowsBackForwardNavigationGestures = isOn
|
|
13
|
+
} else {
|
|
14
|
+
call.reject("WebView is not available")
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|