Skip to content

Commit

Permalink
fix: lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Sep 28, 2023
1 parent 0d9b49b commit 2641449
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
21 changes: 10 additions & 11 deletions ios/Plugin/InAppBrowserPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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})$"

Expand Down
5 changes: 0 additions & 5 deletions ios/Plugin/WKWebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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?:
Expand Down
9 changes: 0 additions & 9 deletions ios/PluginTests/InAppBrowserTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class InAppBrowserWeb extends WebPlugin implements InAppBrowserPlugin {
}

async reload(): Promise<any> {
console.log("reload");
console.log("reload");
return;
}
}

0 comments on commit 2641449

Please sign in to comment.