diff --git a/android/src/main/java/ee/forgr/capacitor_inappbrowser/InAppBrowserPlugin.java b/android/src/main/java/ee/forgr/capacitor_inappbrowser/InAppBrowserPlugin.java index e45ecad4..14bc79ba 100644 --- a/android/src/main/java/ee/forgr/capacitor_inappbrowser/InAppBrowserPlugin.java +++ b/android/src/main/java/ee/forgr/capacitor_inappbrowser/InAppBrowserPlugin.java @@ -178,7 +178,7 @@ public void openWebView(PluginCall call) { options.setCloseModal(false); } options.setPluginCall(call); -// options.getToolbarItemTypes().add(ToolbarItemType.RELOAD); TODO: fix this + // options.getToolbarItemTypes().add(ToolbarItemType.RELOAD); TODO: fix this options.setCallbacks( new WebViewCallbacks() { @Override @@ -231,7 +231,10 @@ public void reload(PluginCall call) { public void close(PluginCall call) { if (webViewDialog != null) { webViewDialog.dismiss(); - notifyListeners("closeEvent", new JSObject().put("url", webViewDialog.getUrl())); + notifyListeners( + "closeEvent", + new JSObject().put("url", webViewDialog.getUrl()) + ); webViewDialog = null; } else { Intent intent = new Intent( diff --git a/ios/Plugin/InAppBrowserPlugin.swift b/ios/Plugin/InAppBrowserPlugin.swift index 272d585f..9e3fd792 100644 --- a/ios/Plugin/InAppBrowserPlugin.swift +++ b/ios/Plugin/InAppBrowserPlugin.swift @@ -138,16 +138,16 @@ public class InAppBrowserPlugin: CAPPlugin { } func getToolbarItems(toolbarType: String) -> [BarButtonItemType] { - var result: [BarButtonItemType] = [] - if toolbarType == "activity" { - result.append(.activity) - } else if toolbarType == "navigation" { - result.append(.back) - result.append(.forward) - } - return result - } - + var result: [BarButtonItemType] = [] + if toolbarType == "activity" { + result.append(.activity) + } else if toolbarType == "navigation" { + result.append(.back) + result.append(.forward) + } + return result + } + @objc func reload(_ call: CAPPluginCall) { self.webViewController?.reload() call.resolve() @@ -162,7 +162,6 @@ public class InAppBrowserPlugin: CAPPlugin { call.resolve() } - func isHexColorCode(_ input: String) -> Bool { let hexColorRegex = "^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$" diff --git a/ios/Plugin/WKWebViewController.swift b/ios/Plugin/WKWebViewController.swift index b464b97a..192ed41d 100644 --- a/ios/Plugin/WKWebViewController.swift +++ b/ios/Plugin/WKWebViewController.swift @@ -313,11 +313,6 @@ open class WKWebViewController: UIViewController { rollbackState() } - override open func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) { switch keyPath { case estimatedProgressKeyPath?: diff --git a/ios/PluginTests/InAppBrowserTests.swift b/ios/PluginTests/InAppBrowserTests.swift index 12990460..c0a9c5ef 100644 --- a/ios/PluginTests/InAppBrowserTests.swift +++ b/ios/PluginTests/InAppBrowserTests.swift @@ -2,15 +2,6 @@ import XCTest @testable import Plugin class InAppBrowserTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } func testEcho() { // This is an example of a functional test case for a plugin. diff --git a/src/web.ts b/src/web.ts index 3b9930e6..70dcca4d 100644 --- a/src/web.ts +++ b/src/web.ts @@ -33,7 +33,7 @@ export class InAppBrowserWeb extends WebPlugin implements InAppBrowserPlugin { } async reload(): Promise { - console.log("reload"); + console.log("reload"); return; } }