From 3eb0fdd9eca72be29805365de3521809a89f9ae9 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Sun, 14 Jun 2020 13:35:18 +0200 Subject: [PATCH] remove menu extra on demand --- pEpNotifications/pEpNotifications/AppDelegate.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pEpNotifications/pEpNotifications/AppDelegate.swift b/pEpNotifications/pEpNotifications/AppDelegate.swift index 3e46bea..e69a783 100644 --- a/pEpNotifications/pEpNotifications/AppDelegate.swift +++ b/pEpNotifications/pEpNotifications/AppDelegate.swift @@ -94,6 +94,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele if sender.state == NSControl.StateValue.on { sender.state = NSControl.StateValue.off UserDefaults.standard.set(false, forKey: "AlwaysShowThisMenu") + if statusText.representedObject == nil { + uninstallMenuExtra() + } } else { sender.state = NSControl.StateValue.on