|
@@ -102,9 +102,6 @@ import Cocoa
|
|
|
var didTrialExpiredLoad: Bool = false
|
|
|
var repeatTrialAlertLoad: Bool = false
|
|
|
|
|
|
- //春季活动
|
|
|
- var recommondPopWindowVC: KMRecommondPopWindow?
|
|
|
-
|
|
|
@IBOutlet weak var rightBottonHeight: NSLayoutConstraint!
|
|
|
|
|
|
var currentController: NSWindowController?
|
|
@@ -231,15 +228,6 @@ import Cocoa
|
|
|
KMAdsInfoManager.shareInstance.adsInfoArrM = arrM
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if ((KMAdvertisementManager.manager.info.popWindowContent) != nil) {
|
|
|
- if KMAdvertisementManager.manager.info.popWindowContent!.content!.count > 0 {
|
|
|
- let info = KMAdvertisementManager.manager.info.popWindowContent!.content?.first
|
|
|
- if KMAdvertisementManager.checkAdvertisementValid(info!) {
|
|
|
- self.loadRecommondPopWindow()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1031,30 +1019,3 @@ extension KMHomeViewController {
|
|
|
self.updateAITipViewShowState()
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-extension KMHomeViewController {
|
|
|
- // MARK: - Recommond活动
|
|
|
- func loadRecommondPopWindow() {
|
|
|
- if recommondPopWindowVC == nil {
|
|
|
- recommondPopWindowVC = KMRecommondPopWindow()
|
|
|
- }
|
|
|
-
|
|
|
- if let info = KMAdvertisementManager.manager.info.popWindowContent?.content?.first {
|
|
|
- recommondPopWindowVC?.recommondInfo = info
|
|
|
-
|
|
|
- guard let windowFrame = self.view.window?.frame, let popWindowFrame = recommondPopWindowVC?.window?.frame else {
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- let x = windowFrame.minX + (windowFrame.size.width - popWindowFrame.size.width) / 2.0
|
|
|
- let y = windowFrame.minY + (windowFrame.size.height - popWindowFrame.size.height) / 2.0
|
|
|
- recommondPopWindowVC?.window?.setFrame(NSRect(x: x, y: y, width: popWindowFrame.size.width, height: popWindowFrame.size.height), display: true)
|
|
|
-
|
|
|
- recommondPopWindowVC?.window?.orderFront((Any).self)
|
|
|
-// recommondPopWindowVC?.window?.becomeMain()
|
|
|
-
|
|
|
- UserDefaults.standard.set("Show", forKey: info.version ?? "")
|
|
|
- UserDefaults.standard.synchronize()
|
|
|
- }
|
|
|
- }
|
|
|
-}
|