Browse Source

【综合】分享PDF去除保存水印逻辑

tangchao 6 months ago
parent
commit
82c6c03972

+ 2 - 46
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -3553,29 +3553,7 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
     }
     }
     
     
     func toolbarViewController(_ viewController: KMToolbarViewController, shareDocument item: NSMenuItem) {
     func toolbarViewController(_ viewController: KMToolbarViewController, shareDocument item: NSMenuItem) {
-        if (!self.saveWatermarkFlag) {
-            self.shareDocument(sender: viewController)
-            return
-        }
-        Task { @MainActor in
-            if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                KMSubscribeWaterMarkWindowController.show(window: self.view.window!, isContinue: true) { isSubscribeSuccess, isWaterMarkExport, isClose in
-                    if (isClose) {
-                        return
-                    }
-                    if (isSubscribeSuccess) {
-                        self.shareDocument(sender: viewController)
-                        return
-                    }
-                    if (isWaterMarkExport) {
-                        self.shareDocument(sender: viewController, limit: true)
-                        return
-                    }
-                }
-                return
-            }
-            self.shareDocument(sender: viewController)
-        }
+        self.shareDocument(sender: viewController)
     }
     }
     
     
     func toolbarViewController(_ viewController: KMToolbarViewController, shareFlatten item: NSMenuItem) {
     func toolbarViewController(_ viewController: KMToolbarViewController, shareFlatten item: NSMenuItem) {
@@ -3587,29 +3565,7 @@ extension KMMainViewController : KMMainToolbarControllerDelegate {
     }
     }
     
     
     func toolbarViewController(_ viewController: KMToolbarViewController, shareOriginalPDF item: NSMenuItem) {
     func toolbarViewController(_ viewController: KMToolbarViewController, shareOriginalPDF item: NSMenuItem) {
-        if (!self.saveWatermarkFlag) {
-            self.shareOriginalPDF(sender: viewController)
-            return
-        }
-        Task { @MainActor in
-            if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                let _ = KMSubscribeWaterMarkWindowController.show(window: self.view.window!, isContinue: true) { isSubscribeSuccess, isWaterMarkExport, isClose in
-                    if (isClose) {
-                        return
-                    }
-                    if (isSubscribeSuccess) {
-                        self.shareOriginalPDF(sender: viewController)
-                        return
-                    }
-                    if (isWaterMarkExport) {
-                        self.shareOriginalPDF(sender: viewController, limit: true)
-                        return
-                    }
-                }
-                return
-            }
-            self.shareOriginalPDF(sender: viewController)
-        }
+        self.shareOriginalPDF(sender: viewController)
     }
     }
     
     
     func toolbarViewController(_ viewController: KMToolbarViewController, scanOCRModel selectedTag: Int) {
     func toolbarViewController(_ viewController: KMToolbarViewController, scanOCRModel selectedTag: Int) {