|
@@ -46,6 +46,7 @@ class KMConvertCollectionViewHeader: KMBaseXibView{
|
|
|
self.layerColorView.layer?.cornerRadius = 12
|
|
|
self.layerColorView.layer?.backgroundColor = NSColor(red: 1.0, green: 94/255.0, blue: 44/255.0, alpha: 1.0).cgColor
|
|
|
|
|
|
+ self.refreshData()
|
|
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFinishedNotification(notification:)), name: NSNotification.Name(rawValue: "KMIAPProductPurchasedNotification"), object: nil)
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFinishedNotification(notification:)), name: NSNotification.Name(rawValue: "KMIAPProductRestoreFinishedNotification"), object: nil)
|
|
@@ -72,12 +73,20 @@ class KMConvertCollectionViewHeader: KMBaseXibView{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ func refreshData() {
|
|
|
+ if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
|
|
|
+ containerView.isHidden = true
|
|
|
+ } else {
|
|
|
+ containerView.isHidden = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@objc func IAPProductPurchasedNotification(notification: Notification) {
|
|
|
- containerView.isHidden = true
|
|
|
+ self.refreshData()
|
|
|
}
|
|
|
|
|
|
@objc func IAPProductRestoreFinishedNotification(notification: Notification) {
|
|
|
- containerView.isHidden = true
|
|
|
+ self.refreshData()
|
|
|
}
|
|
|
|
|
|
}
|