diff --git a/CHANGELOG.md b/CHANGELOG.md index a1e4334..dc5eb49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ui/mainwindow.go b/ui/mainwindow.go index 2995cc8..1536c67 100644 --- a/ui/mainwindow.go +++ b/ui/mainwindow.go @@ -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() {