Browse Source

【系统菜单栏】file菜单里share子菜单在home页置灰

tangchao 1 year ago
parent
commit
0b432a9926
1 changed files with 8 additions and 0 deletions
  1. 8 0
      PDF Office/PDF Master/AppDelegate.swift

+ 8 - 0
PDF Office/PDF Master/AppDelegate.swift

@@ -452,6 +452,14 @@ extension AppDelegate : NSMenuDelegate,NSMenuItemValidation {
             self.updateLoginMenuItem()
             return KMLightMemberManager.manager.isLogin()
         }
+        
+        if (action == #selector(sharePageItemAction)) {
+            guard let _windowC = NSApp.mainWindow?.windowController as? KMBrowserWindowController else {
+                return false
+            }
+ 
+            return !_windowC.browser.activeTabContents().isHome
+        }
         return true
     }