Browse Source

AI - 文本翻译判断大小调整为>=10M都会禁止

wanjun 1 year ago
parent
commit
8167839af4

+ 1 - 1
PDF Office/PDF Master/Class/Home/ViewController/KMAITranslationVC.swift

@@ -373,7 +373,7 @@ class KMAITranslationVC: NSViewController {
             let fileAttributes = try fileManager.attributesOfItem(atPath: filePath)
             if let fileSize = fileAttributes[.size] as? UInt64 {
                 let megabyteSize = fileSize / (1024 * 1024)
-                return megabyteSize > 10
+                return megabyteSize >= 10
             }
         } catch {
             print("Error: \(error)")

+ 1 - 1
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift

@@ -631,7 +631,7 @@ import KMAdvertisement
             let fileAttributes = try fileManager.attributesOfItem(atPath: filePath)
             if let fileSize = fileAttributes[.size] as? UInt64 {
                 let megabyteSize = fileSize / (1024 * 1024)
-                return megabyteSize > 10
+                return megabyteSize >= 10
             }
         } catch {
             print("Error: \(error)")

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -626,7 +626,7 @@ import Cocoa
             let fileAttributes = try fileManager.attributesOfItem(atPath: filePath)
             if let fileSize = fileAttributes[.size] as? UInt64 {
                 let megabyteSize = fileSize / (1024 * 1024)
-                return megabyteSize > 10
+                return megabyteSize >= 10
             }
         } catch {
             print("Error: \(error)")