Skip to content

Commit

Permalink
Remove extra unused parameter in delegate signature
Browse files Browse the repository at this point in the history
  • Loading branch information
vincode-io committed Mar 16, 2021
1 parent 81c0422 commit 78b9444
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Mac/MainWindow/Detail/DetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ extension DetailViewController: DetailWebViewControllerDelegate {
statusBarView.mouseoverLink = link
}

func mouseDidExit(_ detailWebViewController: DetailWebViewController, link: String) {
func mouseDidExit(_ detailWebViewController: DetailWebViewController) {
guard detailWebViewController === currentWebViewController else {
return
}
Expand Down
6 changes: 3 additions & 3 deletions Mac/MainWindow/Detail/DetailWebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Articles

protocol DetailWebViewControllerDelegate: class {
func mouseDidEnter(_: DetailWebViewController, link: String)
func mouseDidExit(_: DetailWebViewController, link: String)
func mouseDidExit(_: DetailWebViewController)
}

final class DetailWebViewController: NSViewController, WKUIDelegate {
Expand Down Expand Up @@ -178,8 +178,8 @@ extension DetailWebViewController: WKScriptMessageHandler {
if message.name == MessageName.mouseDidEnter, let link = message.body as? String {
delegate?.mouseDidEnter(self, link: link)
}
else if message.name == MessageName.mouseDidExit, let link = message.body as? String{
delegate?.mouseDidExit(self, link: link)
else if message.name == MessageName.mouseDidExit {
delegate?.mouseDidExit(self)
}
}
}
Expand Down

0 comments on commit 78b9444

Please sign in to comment.