diff --git a/BrewBar/BrewBarApp.swift b/BrewBar/BrewBarApp.swift index 12b4d12..2f76d0c 100644 --- a/BrewBar/BrewBarApp.swift +++ b/BrewBar/BrewBarApp.swift @@ -266,6 +266,12 @@ class AppDelegate: NSObject, NSApplicationDelegate { self.cachedOutdated = outdated + // reflect what was found before any auto-upgrade starts, so the + // menu shows the real list while the upgrade is running + self.updateOutdatedMenu(with: outdated) + self.updateStatus(count: outdated.count) + self.updateMenuBarCount() + // only trigger for the kinds that are both enabled AND outdated — // e.g. an outdated cask must not start a pointless formulae upgrade let upgradeFormulae = Settings.autoUpgradeFormulae && !outdated.formulae.isEmpty @@ -275,9 +281,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { return } - self.updateOutdatedMenu(with: outdated) - self.updateStatus(count: outdated.count) - self.updateMenuBarCount() + // notify only about what auto-upgrade didn't (or couldn't) handle self.notifyIfNeeded(outdated: outdated.all.map(\.name)) if outdated.isEmpty { self.setMenuBarIcon("brewbar-uptodate")