feat: Apply downloaded update when all windows are closed - #8211
Open
ThomasHartDev wants to merge 2 commits into
Open
feat: Apply downloaded update when all windows are closed#8211ThomasHartDev wants to merge 2 commits into
ThomasHartDev wants to merge 2 commits into
Conversation
Install a waiting update when Hyper has no open windows, instead of leaving the process idle on the old version.
quitAndInstall restarts the app, so closing the last window on Windows must keep falling through to app.quit(). macOS is the only platform where zero windows still means Hyper is running.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an update has already been downloaded and the last Hyper window is gone, call quitAndInstall on macOS. That is the only platform where zero windows still means Hyper is running in the dock.
Windows and Linux are unchanged. Closing the last window on Windows still calls app.quit(); Electron applies a downloaded update on the next launch. Linux has no in-app installer.
Fixes #1325
pnpm run test:unit passes (12 tests), including darwin/win32/linux idle-install cases. eslint is clean on the files this PR adds or changes.