macOS: remove unused menu validations (#13726)

UpdateController isn't the target of any menu item, we don't need add
menu validation here.
This commit is contained in:
Mitchell Hashimoto
2026-08-11 11:02:28 -07:00
committed by GitHub

View File

@@ -59,7 +59,7 @@ class UpdateController {
/// Check for updates.
///
/// This is typically connected to a menu item action.
@objc func checkForUpdates() {
func checkForUpdates() {
// If we're already idle, then just check for updates immediately.
if viewModel.state == .idle {
updater.checkForUpdates()
@@ -100,17 +100,6 @@ class UpdateController {
self?.updater.checkForUpdates()
}
}
/// Validate the check for updates menu item.
///
/// - Parameter item: The menu item to validate
/// - Returns: Whether the menu item should be enabled
func validateMenuItem(_ item: NSMenuItem) -> Bool {
if item.action == #selector(checkForUpdates) {
return updater.canCheckForUpdates
}
return true
}
}
private struct InstallingAccessoryView: View {