|
@@ -34,8 +34,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if let data = self?.canUseAdvanced, data == false {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self!.kmCurrentWindowC!.window!, .pageEdit)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -110,27 +110,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
self.toolBar.unSelectItem(for: KMToolbarPageEditSplitItemIdentifier)
|
|
|
|
|
|
self.showSplitWindow { [unowned self] splitWindowC, model in
|
|
|
- if (!self.canUseAdvanced){
|
|
|
- _ = KMComparativeTableViewController.show(window: splitWindowC.window!)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- if (!self.canPayFunction) {
|
|
|
- _ = KMSubscribeWaterMarkWindowController.show(window: splitWindowC.window!, type: .split) { isSubscribeSuccess, isWaterMarkExport, isClose in
|
|
|
- if (isClose) {
|
|
|
- return
|
|
|
- }
|
|
|
- if (isSubscribeSuccess) {
|
|
|
- self.km_endSheet()
|
|
|
- self.splitMethod(windowC: splitWindowC, model: model)
|
|
|
- return
|
|
|
- }
|
|
|
- if (isWaterMarkExport) {
|
|
|
- self.km_endSheet()
|
|
|
- self.splitMethod(windowC: splitWindowC, model: model, limit: true)
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -156,18 +137,19 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
}
|
|
|
}
|
|
|
} completionBlock: { [unowned self] documents in
|
|
|
- if !self.canUseAdvanced {
|
|
|
- _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
self.replacePages(of: self.thumbnailView.selectionIndexPaths, with: documents)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
override func replacePages(of targetIndexpaths: Set<IndexPath>, with documents: [CPDFDocument]) {
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -216,28 +198,11 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
let extractAfterDelete = settingView.extractAfterDeletePageValue
|
|
|
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- _ = KMComparativeTableViewController.show(window: _windowC.window!)
|
|
|
- return
|
|
|
- }
|
|
|
- if await (KMLightMemberManager.manager.canPayFunction() == false) {
|
|
|
- let _ = KMSubscribeWaterMarkWindowController.show(window: _windowC.window!, type: .extract) { isSubscribeSuccess, isWaterMarkExport, isClose in
|
|
|
- if (isClose) {
|
|
|
- return
|
|
|
- }
|
|
|
- if (isSubscribeSuccess) {
|
|
|
- self?.km_endSheet()
|
|
|
- callback(.ok, oneDocumentPerPage, extractAfterDelete)
|
|
|
- return
|
|
|
- }
|
|
|
- if (isWaterMarkExport) {
|
|
|
- self?.km_endSheet()
|
|
|
- callback(.ok, oneDocumentPerPage, extractAfterDelete)
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
self?.km_endSheet()
|
|
|
callback(.ok, oneDocumentPerPage, extractAfterDelete)
|
|
|
}
|
|
@@ -248,8 +213,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
self.trackEvent(type: .reverse)
|
|
|
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!, .pageEdit)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -260,8 +225,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
|
|
|
override func leftRotateIndexpaths(indexpaths: Set<IndexPath>) {
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -271,8 +236,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
|
|
|
override func rightRotateIndexpaths(indexpaths: Set<IndexPath>) {
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -282,8 +247,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
|
|
|
override func insertBlankPage(size: NSSize, at index: Int) {
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -322,10 +287,11 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!self.canUseAdvanced) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
self.insertPages(pages: pages, at: indexs)
|
|
|
}
|
|
|
}
|
|
@@ -337,8 +303,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
}
|
|
|
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -348,8 +314,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
|
|
|
override func cutAction() {
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -359,8 +325,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
|
|
|
override func copyAction() {
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -370,8 +336,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
|
|
|
override func pasteAction() {
|
|
|
Task { @MainActor in
|
|
|
- if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -382,8 +348,8 @@ class KMPDFEditViewController_dmg: KMPDFEditViewController {
|
|
|
|
|
|
extension KMPDFEditViewController_dmg {
|
|
|
override func thumbnailView(thumbanView: KMThumbnailView, shouldAcceptDrop draggingInfo: NSDraggingInfo, indexPath: IndexPath, dropOperation: NSCollectionView.DropOperation) -> Bool {
|
|
|
- if (!self.canUseAdvanced) {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!, .pageEdit)
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return false
|
|
|
}
|
|
|
|
|
@@ -391,15 +357,13 @@ extension KMPDFEditViewController_dmg {
|
|
|
}
|
|
|
|
|
|
override func thumbnailView(thumbanView: KMThumbnailView, shouldPasteboardWriterForItemAt indexPath: IndexPath) -> Bool {
|
|
|
- if (!self.canUseAdvanced) {
|
|
|
- DispatchQueue.main.async {
|
|
|
- let _ = KMComparativeTableViewController.show(window: self.view.window!, .pageEdit)
|
|
|
- }
|
|
|
- return false
|
|
|
- }
|
|
|
- if (!self.canPayFunction) {
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
return false
|
|
|
}
|
|
|
+// if (!self.canPayFunction) {
|
|
|
+// return false
|
|
|
+// }
|
|
|
|
|
|
return true
|
|
|
}
|