mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
👌 Cleanup App.busy -> PhpEnv.shared.isBusy
This commit is contained in:
@ -36,12 +36,6 @@ class App {
|
||||
return machine
|
||||
}
|
||||
|
||||
/** Whether the app is busy doing something. Used to determine what UI to display. */
|
||||
// TODO: Remove this, and always use PhpEnv.shared.isBusy
|
||||
static var busy: Bool {
|
||||
return PhpEnv.shared.isBusy
|
||||
}
|
||||
|
||||
// MARK: Variables
|
||||
|
||||
/** The list of preferences that are currently active. */
|
||||
|
@ -145,7 +145,7 @@ class MainMenu: NSObject, NSWindowDelegate, NSMenuDelegate, PhpSwitcherDelegate
|
||||
/** Refreshes the icon with the PHP version. */
|
||||
@objc func refreshIcon() {
|
||||
DispatchQueue.main.async { [self] in
|
||||
if (App.busy) {
|
||||
if (PhpEnv.shared.isBusy) {
|
||||
setStatusBar(image: NSImage(named: NSImage.Name("StatusBarIcon"))!)
|
||||
} else {
|
||||
if Preferences.preferences[.shouldDisplayDynamicIcon] as! Bool == false {
|
||||
|
@ -22,7 +22,7 @@ class StatusMenu : NSMenu {
|
||||
}
|
||||
|
||||
func addPhpActionMenuItems() {
|
||||
if App.busy {
|
||||
if PhpEnv.shared.isBusy {
|
||||
addItem(NSMenuItem(title: "mi_busy".localized, action: nil, keyEquivalent: ""))
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user