Skip to content

Check for updates on startup and in About window - #21

Merged
coldhighsun merged 2 commits into
mainfrom
feat/auto-update-check
Jul 25, 2026
Merged

Check for updates on startup and in About window#21
coldhighsun merged 2 commits into
mainfrom
feat/auto-update-check

Conversation

@coldhighsun

Copy link
Copy Markdown
Owner

Summary

  • Checks the GitHub Releases feed (coldhighsun/PayBeat) for a newer stable version on app startup (throttled to once per 24h via SalarySettings.LastUpdateCheckUtc) and every time the About window is opened.
  • Startup: shows a tray balloon notification when a newer release is found.
  • About window: shows a status line under the version number ("checking...", "up to date", or a clickable "Update available: vX.Y.Z" link to the release page).
  • Refactors App.OnStartup into named phases (LoadStartupSettings, TryAcquireSingleInstance, CreateMainViewModelAndWindow, StartHiddenInTray, ShowMainWindow) for readability; no behavior changes.

Test plan

  • dotnet build passes with TreatWarningsAsErrors
  • Run the app, confirm startup update check fires and (if a newer release exists) shows a tray balloon
  • Open the About window, confirm status line transitions from "checking" to "up to date" / "update available", and the link opens the GitHub release page
  • Verify offline: no exceptions, UI falls back to "up to date"
  • Verify DisplayMode.None startup still only shows the tray icon, and second-instance guard / hotkey-conflict prompts still work

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.
@coldhighsun
coldhighsun merged commit 84ea3f8 into main Jul 25, 2026
4 checks passed
@coldhighsun
coldhighsun deleted the feat/auto-update-check branch July 25, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant