feat: implement automatic update checking and downloading functionality in the desktop app, enhancing user experience with seamless updates and corresponding UI settings

This commit is contained in:
wizardchen
2026-04-11 18:27:08 +08:00
committed by lyingbug
parent c4ebc1f60e
commit 9874fcee7c
13 changed files with 527 additions and 23 deletions
+14
View File
@@ -68,3 +68,17 @@ func (a *App) GetAPILanBaseURL() string {
func (a *App) GetDesktopListenPublicActive() bool {
return a.listenPublic
}
// CheckForUpdates manually triggers the update check from the frontend.
func (a *App) CheckForUpdates() {
if a.ctx != nil {
checkUpdate(a.ctx, desktopAboutVersion(), true, false)
}
}
// AutoCheckForUpdates silently checks for updates and downloads them.
func (a *App) AutoCheckForUpdates() {
if a.ctx != nil {
checkUpdate(a.ctx, desktopAboutVersion(), false, true)
}
}