Check for updates on startup and in About window - #21
Merged
Conversation
Checks the project's GitHub Releases feed on startup (throttled to once per 24h) and every time the About window is opened, notifying the user via a tray balloon or an inline status link when a newer stable release is available.
OnStartup previously did settings load, single-instance check, view-model/window creation, hotkey registration, startup placement, tray creation, and the update check all inline. Split into LoadStartupSettings/TryAcquireSingleInstance/CreateMainViewModelAndWindow/ StartHiddenInTray/ShowMainWindow so each phase reads as one step, and deduplicated the tray/update-check calls that were repeated in both display-mode branches. No behavior or ordering changes.
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.
Summary
coldhighsun/PayBeat) for a newer stable version on app startup (throttled to once per 24h viaSalarySettings.LastUpdateCheckUtc) and every time the About window is opened.App.OnStartupinto named phases (LoadStartupSettings,TryAcquireSingleInstance,CreateMainViewModelAndWindow,StartHiddenInTray,ShowMainWindow) for readability; no behavior changes.Test plan
dotnet buildpasses withTreatWarningsAsErrorsDisplayMode.Nonestartup still only shows the tray icon, and second-instance guard / hotkey-conflict prompts still work