macOS: Hide other-user tunnels in the status menu

This commit is contained in:
Roopesh Chander 2019-04-03 19:18:53 +05:30
parent fb4dca6018
commit c8ac2c1995
1 changed files with 1 additions and 0 deletions

View File

@ -184,6 +184,7 @@ extension StatusMenu {
func insertTunnelMenuItem(for tunnel: TunnelContainer, at tunnelIndex: Int) {
let menuItem = TunnelMenuItem(tunnel: tunnel, action: #selector(tunnelClicked(sender:)))
menuItem.target = self
menuItem.isHidden = !tunnel.isTunnelConfigurationAvailableInKeychain
insertItem(menuItem, at: firstTunnelMenuItemIndex + tunnelIndex)
if numberOfTunnelMenuItems == 0 {
insertItem(NSMenuItem.separator(), at: firstTunnelMenuItemIndex + tunnelIndex + 1)