|
@@ -4391,7 +4391,7 @@ extension KMMainViewController: KMPDFToolbarControllerDelegate {
|
|
|
} else if itemIdentifier == KMPDFToolbar_protect_redact_Apply_Identifier {
|
|
|
toolbarViewModeChanged()
|
|
|
|
|
|
- self.redactApplyAction()
|
|
|
+ self.redactApplyAction(needAlert: false)
|
|
|
|
|
|
} else if itemIdentifier == KMPDFToolbar_protect_redact_Exit_Identifier {
|
|
|
toolbarViewModeChanged()
|
|
@@ -7534,12 +7534,16 @@ extension KMMainViewController {
|
|
|
}
|
|
|
|
|
|
// MARK: - Redact 【标记密文】
|
|
|
- func redactApplyAction() {
|
|
|
- let returnCode = KMAlertTool.runModelForMainThread_r(message: "", informative: KMLocalizedString("This will permanently remove the redacted information from this document. Once you save this document, you won’t be able to retrieve the redacted information."), buttons: [KMLocalizedString("Apply"), KMLocalizedString("Cancel")])
|
|
|
- if returnCode == .alertFirstButtonReturn {
|
|
|
- DispatchQueue.main.async {
|
|
|
- self.saveAsPath()
|
|
|
+ func redactApplyAction(needAlert: Bool = true) {
|
|
|
+ if needAlert {
|
|
|
+ let returnCode = KMAlertTool.runModelForMainThread_r(message: "", informative: KMLocalizedString("This will permanently remove the redacted information from this document. Once you save this document, you won’t be able to retrieve the redacted information."), buttons: [KMLocalizedString("Apply"), KMLocalizedString("Cancel")])
|
|
|
+ if returnCode == .alertFirstButtonReturn {
|
|
|
+ DispatchQueue.main.async {
|
|
|
+ self.saveAsPath()
|
|
|
+ }
|
|
|
}
|
|
|
+ } else {
|
|
|
+ self.saveAsPath()
|
|
|
}
|
|
|
}
|
|
|
|