Explorar el Código

【2025】【BOTA】注释列表,从下往上滚动浏览时很卡 - 修复

lizhe hace 3 semanas
padre
commit
d5c84a2918

+ 3 - 0
PDF Office/PDF Master/KMClass/Left/Annotaion/Model/KMBOTAAnnotationTool.swift

@@ -102,6 +102,9 @@ class KMBOTAAnnotationTool: NSObject {
             }
             contentString = KMBOTAAnnotationTool.fetchText(text: contentString)
         }
+        
+        //限制文字返回数量
+        contentString = String(contentString.prefix(200))
         return contentString
     }
     

+ 0 - 6
PDF Office/PDF Master/KMClass/Left/Annotaion/View/KMNoteTableViewCell.swift

@@ -323,10 +323,6 @@ extension KMNoteTableViewCell {
                 self.isFold = !(model?.isExpand ?? false)
                     self.contentViewHidden(false)
             } else if data.isKind(of: CPDFLineAnnotation.self) || noteType == SKNSquareString || noteType == SKNCircleString { //  || noteType == SKNInkString
-                noteString = data.contents ?? ""
-                if let anno = data as? CPDFLineAnnotation, anno.isMeasure {
-                    noteString = anno.string() ?? ""
-                }
                 self.annotationContentLabel.stringValue = noteString
                 self.isFold = true
                 let expand = model?.isExpand ?? false
@@ -434,8 +430,6 @@ extension KMNoteTableViewCell {
                 } else {
                     self.foldButton.image = NSImage(named: "KMImageNameBtnTriRightNor")
                 }
- 
-                noteString = data.contents ?? ""
                 self.annotationContentLabel.stringValue = noteString
                     self.contentViewHidden(false)
             } else if data is CPDFFreeTextAnnotation {