more fyne.Do in controller

This commit is contained in:
Drew Weymouth
2025-02-08 08:35:34 -03:00
parent 94115f2875
commit 2ff3853015
2 changed files with 83 additions and 69 deletions
+6 -4
View File
@@ -111,11 +111,13 @@ func NewMainWindow(fyneApp fyne.App, appName, displayAppName, appVersion string,
m.BrowsingPane.AddSettingsMenuItem(lang.L("Check for Updates"), func() {
go func() {
if t := app.UpdateChecker.CheckLatestVersionTag(); t != "" && t != app.VersionTag() {
m.ShowNewVersionDialog(displayAppName, t)
fyne.Do(func() { m.ShowNewVersionDialog(displayAppName, t) })
} else {
dialog.ShowInformation(lang.L("No new version found"),
lang.L("You are running the latest version of")+" "+displayAppName,
m.Window)
fyne.Do(func() {
dialog.ShowInformation(lang.L("No new version found"),
lang.L("You are running the latest version of")+" "+displayAppName,
m.Window)
})
}
}()
})