2 İşlemeler a032b15a20 ... f1b4b31437

Yazar SHA1 Mesaj Tarih
  liaoxiaoyue f1b4b31437 【左边栏】- 移除缩略图的分享功能 1 yıl önce
  liaoxiaoyue d5b9d678d2 【左边栏】- 搜索记录10条只显示9条的问题修复。 1 yıl önce

+ 5 - 4
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Search/KMSearchViewController.swift

@@ -137,14 +137,15 @@ class KMSearchViewController: NSViewController, NSTextFieldDelegate, NSSearchFie
         let searchString = self.searchTextField.stringValue
         
         if searchString != "" {
-            if searchs.count == 10 {
-                searchs.remove(at: 9)
-            }
-            
             //缓存搜索词汇是否重复
             if searchs.contains(searchString) {
                 searchs.removeObject(searchString)
             }
+            
+            if searchs.count == 10 {
+                searchs.remove(at: 9)
+            }
+            
             searchs.insert((self.searchTextField.stringValue), at: 0)
             UserDefaults.standard.set(searchs, forKey: CPDFOfficeSearchHistoryKey)
             

+ 3 - 3
PDF Office/PDF Office/Class/PDFWindowController/Side/LeftSide/Thumbnail/KMThumbnailViewController.swift

@@ -674,10 +674,10 @@ extension KMThumbnailViewController : NSMenuDelegate,NSMenuItemValidation {
         item = menu.addItem(withTitle: NSLocalizedString("Print", comment: ""), action: #selector(printItemAction), target: self)
         item.representedObject = row
         
-        item = menu.addItem(withTitle: NSLocalizedString("Share", comment: ""), action: nil, target: self)
-        item.representedObject = row
+//        item = menu.addItem(withTitle: NSLocalizedString("Share", comment: ""), action: nil, target: self)
+//        item.representedObject = row
         
-        item.submenu = NSSharingServicePicker.menu(forSharingItems: [self.listView.document.documentURL ?? ""], subjectContext: "", withTarget: self, selector: #selector(sharePageItemAction), serviceDelegate: nil)
+//        item.submenu = NSSharingServicePicker.menu(forSharingItems: [self.listView.document.documentURL ?? ""], subjectContext: "", withTarget: self, selector: #selector(sharePageItemAction), serviceDelegate: nil)
         
     }
 }