don't show update prompt if found version is same as running version

This commit is contained in:
Drew Weymouth
2023-04-06 08:54:49 -07:00
parent e80c4bbce5
commit 198110d1dc
2 changed files with 12 additions and 2 deletions
+3
View File
@@ -6,6 +6,9 @@
- [#107](https://github.com/dweymouth/supersonic/issues/107) Add playback settings dropdown to choose output audio device
- [#119](https://github.com/dweymouth/supersonic/issues/119) Add file path column to tracklist view
### Fixes
- **todo-commithash** Don't show update available prompt if the found version is the same as the running app version
## [0.1.0-beta] - 2023-04-01
### Added
+9 -2
View File
@@ -83,11 +83,18 @@ func NewMainWindow(fyneApp fyne.App, appName, appVersion string, app *backend.Ap
m.Router.NavigateTo(HomePage)
// check if found new version on startup
if t := app.UpdateChecker.VersionTagFound(); t != "" && t != app.Config.Application.LastCheckedVersion {
m.ShowNewVersionDialog(appName, t)
if t != app.VersionTag() {
m.ShowNewVersionDialog(appName, t)
}
m.App.Config.Application.LastCheckedVersion = t
}
// register callback for the ongoing periodic update check
m.App.UpdateChecker.OnUpdatedVersionFound = func() {
m.ShowNewVersionDialog(appName, m.App.UpdateChecker.VersionTagFound())
t := m.App.UpdateChecker.VersionTagFound()
if t != app.VersionTag() {
m.ShowNewVersionDialog(appName, t)
}
m.App.Config.Application.LastCheckedVersion = t
}
})
app.ServerManager.OnLogout(func() {