diff --git a/BrewBar/BrewBarApp.swift b/BrewBar/BrewBarApp.swift index 793e41f..be2a4fd 100644 --- a/BrewBar/BrewBarApp.swift +++ b/BrewBar/BrewBarApp.swift @@ -35,9 +35,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { } } - // ✅ cache to prevent duplicate outdated calls + /// last known outdated list, shown in the Upgrade All confirmation var cachedOutdated: [String] = [] - var lastOutdatedFetch: Date? // MARK: - Menu @@ -272,17 +271,6 @@ class AppDelegate: NSObject, NSApplicationDelegate { return alert.runModal() == .alertFirstButtonReturn } - /// ✅ SMART refresh (uses cache) - @objc func refreshOutdatedList() { - // if fetched in last 5s → uses cache - if let last = lastOutdatedFetch, Date().timeIntervalSince(last) < 5 { - updateOutdatedMenu(with: cachedOutdated) - return - } - - fetchOutdated() - } - /// ✅ FORCE refresh (menu button) @objc func forceRefreshOutdated() { fetchOutdated() @@ -295,7 +283,6 @@ class AppDelegate: NSObject, NSApplicationDelegate { let lines = BrewParser.parseOutdated(output) self.cachedOutdated = lines - self.lastOutdatedFetch = Date() self.updateOutdatedMenu(with: lines) self.updateStatus(count: lines.count)