1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 20:10:08 +02:00

👌 Cleanup App.busy -> PhpEnv.shared.isBusy

This commit is contained in:
2022-02-12 15:08:00 +01:00
parent 6cd1d78572
commit 61427ec505
3 changed files with 2 additions and 8 deletions

View File

@ -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. */

View File

@ -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 {

View File

@ -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
}