瀏覽代碼

【BOTA】注释补充筛选

tangchao 1 年之前
父節點
當前提交
35a00fb362

+ 11 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -1303,8 +1303,8 @@ class KMLeftSideViewController: KMSideViewController {
             } else {
                 self?.filterButtonLayer?.isHidden = false
             }
-//
-//            [blockSelf annotationSort:@[typeArr, colorArr, authorArr]];
+
+            self?.annotationSort(sortArray: [])
         }
         filterViewController.cancelCallback = { isCancel in
             if (isCancel) {
@@ -1471,17 +1471,20 @@ class KMLeftSideViewController: KMSideViewController {
             var authorArr: [Any] = []
             
             let sud = UserDefaults.standard
-            let typeData = sud.object(forKey: "KMNoteOutlineFilterSelectArray_Type" + self.listView.document.documentURL.path) as? Data
+//            let typeData = sud.object(forKey: "KMNoteOutlineFilterSelectArray_Type" + self.listView.document.documentURL.path) as? Data
+            let typeData = sud.object(forKey: "KMNoteOutlineFilterSelectArray_Type") as? Data
             if typeData != nil {
                 typeArr = NSKeyedUnarchiver.unarchiveObject(with: typeData!) as! [Any]
             }
             
-            let colorData = sud.object(forKey: "KMNoteOutlineFilterSelectArray_Color" + self.listView.document.documentURL.path) as? Data
+//            let colorData = sud.object(forKey: "KMNoteOutlineFilterSelectArray_Color" + self.listView.document.documentURL.path) as? Data
+            let colorData = sud.object(forKey: "KMNoteOutlineFilterSelectArray_Color") as? Data
             if colorData != nil {
                 colorArr = NSKeyedUnarchiver.unarchiveObject(with: colorData!) as! [Any]
             }
             
-            let authorData = sud.object(forKey: "KMNoteOutlineFilterSelectArray_Author" + self.listView.document.documentURL.path) as? Data
+//            let authorData = sud.object(forKey: "KMNoteOutlineFilterSelectArray_Author" + self.listView.document.documentURL.path) as? Data
+            let authorData = sud.object(forKey: "KMNoteOutlineFilterSelectArray_Author") as? Data
             if authorData != nil {
                 authorArr = NSKeyedUnarchiver.unarchiveObject(with: authorData!) as! [Any]
             }
@@ -1527,6 +1530,9 @@ class KMLeftSideViewController: KMSideViewController {
                 
                 self._annotations = dataArray
             }
+            Task { @MainActor in
+                self.noteOutlineView.reloadData()
+            }
         }
     }