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
+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() {