|
@@ -280,26 +280,25 @@ class KMAdsWebView: NSView, WKNavigationDelegate, CAAnimationDelegate {
|
|
|
|
|
|
if let completionHandler = self.completionHandler {
|
|
|
completionHandler(currentPage + 1)
|
|
|
- self.completionHandler = nil
|
|
|
}
|
|
|
removeFromSuperview()
|
|
|
}
|
|
|
|
|
|
@objc func buttonItemClicked(_ sender: Any) {
|
|
|
|
|
|
- guard let newURL = NSURL(string: self.adsInfo.adsURLLink) else {
|
|
|
+ guard let string = self.adsInfo?.adsURLLink else {
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ let newURL = NSURL(string: string)
|
|
|
|
|
|
- NSWorkspace.shared.open(newURL as URL)
|
|
|
-
|
|
|
- adDelegate?.kmAdViewClicked(self)
|
|
|
+ NSWorkspace.shared.open(newURL! as URL)
|
|
|
|
|
|
if let completionHandler = self.completionHandler {
|
|
|
completionHandler(currentPage + 1)
|
|
|
- self.completionHandler = nil
|
|
|
}
|
|
|
- removeFromSuperview()
|
|
|
+
|
|
|
+ adDelegate?.kmAdViewClicked(self)
|
|
|
}
|
|
|
|
|
|
@objc func buttonItemClicked_Close(_ sender: Any) {
|
|
@@ -307,7 +306,6 @@ class KMAdsWebView: NSView, WKNavigationDelegate, CAAnimationDelegate {
|
|
|
|
|
|
if let completionHandler = self.completionHandler {
|
|
|
completionHandler(0)
|
|
|
- self.completionHandler = nil
|
|
|
}
|
|
|
removeFromSuperview()
|
|
|
}
|