invoke check for update menu callback in goroutine
This commit is contained in:
+9
-7
@@ -98,13 +98,15 @@ func NewMainWindow(fyneApp fyne.App, appName, appVersion string, app *backend.Ap
|
|||||||
})
|
})
|
||||||
m.BrowsingPane.AddSettingsMenuItem("Log Out", app.ServerManager.Logout)
|
m.BrowsingPane.AddSettingsMenuItem("Log Out", app.ServerManager.Logout)
|
||||||
m.BrowsingPane.AddSettingsMenuItem("Check for Updates", func() {
|
m.BrowsingPane.AddSettingsMenuItem("Check for Updates", func() {
|
||||||
if t := app.UpdateChecker.CheckLatestVersionTag(); t != "" && t != app.VersionTag() {
|
go func() {
|
||||||
m.ShowNewVersionDialog(appName, t)
|
if t := app.UpdateChecker.CheckLatestVersionTag(); t != "" && t != app.VersionTag() {
|
||||||
} else {
|
m.ShowNewVersionDialog(appName, t)
|
||||||
dialog.ShowInformation("No new version found",
|
} else {
|
||||||
"You are running the latest version of "+appName,
|
dialog.ShowInformation("No new version found",
|
||||||
m.Window)
|
"You are running the latest version of "+appName,
|
||||||
}
|
m.Window)
|
||||||
|
}
|
||||||
|
}()
|
||||||
})
|
})
|
||||||
m.BrowsingPane.AddSettingsMenuItem("About...", m.Controller.ShowAboutDialog)
|
m.BrowsingPane.AddSettingsMenuItem("About...", m.Controller.ShowAboutDialog)
|
||||||
m.addNavigationButtons()
|
m.addNavigationButtons()
|
||||||
|
|||||||
Reference in New Issue
Block a user