Skip to content

Commit

Permalink
Don't add Install Now to menu if update isn't resumable
Browse files Browse the repository at this point in the history
  • Loading branch information
quanganhdo committed Jan 1, 2025
1 parent b237d16 commit c276dd2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,14 @@ final class MoreOptionsMenu: NSMenu, NSMenuDelegate {
#if SPARKLE
guard NSApp.runType != .uiTests,
let updateController = Application.appDelegate.updateController,
let update = updateController.latestUpdate,
!update.isInstalled,
updateController.updateProgress.isDone
else {
let update = updateController.latestUpdate else {
return
}

guard updateController.hasPendingUpdate else {
return
}

addItem(UpdateMenuItemFactory.menuItem(for: update))
addItem(NSMenuItem.separator())
#endif
Expand Down

0 comments on commit c276dd2

Please sign in to comment.