diff --git a/phpmon/Domain/Menu/MainMenu.swift b/phpmon/Domain/Menu/MainMenu.swift index 982b639..29e20de 100644 --- a/phpmon/Domain/Menu/MainMenu.swift +++ b/phpmon/Domain/Menu/MainMenu.swift @@ -340,6 +340,7 @@ class MainMenu: NSObject, NSWindowDelegate, NSMenuDelegate, PhpSwitcherDelegate func menuWillOpen(_ menu: NSMenu) { // Make sure the shortcut key does not trigger this when the menu is open App.shared.shortcutHotkey?.isPaused = true + NotificationCenter.default.post(name: Events.ServicesUpdated, object: nil) } func menuDidClose(_ menu: NSMenu) { diff --git a/phpmon/Domain/Menu/ServicesView.swift b/phpmon/Domain/Menu/ServicesView.swift index 419deb5..a3f7c87 100644 --- a/phpmon/Domain/Menu/ServicesView.swift +++ b/phpmon/Domain/Menu/ServicesView.swift @@ -44,11 +44,6 @@ class ServicesView: NSView, XibLoadable { ) return item } - - override func viewWillDraw() { - super.viewWillDraw() - Task { await self.loadData() } - } @objc func updateInformation() { Task { await self.loadData() }