diff --git a/FyneApp.toml b/FyneApp.toml index 22c120a..b40954d 100644 --- a/FyneApp.toml +++ b/FyneApp.toml @@ -2,6 +2,7 @@ Icon = "res/appicon-512.png" Name = "Supersonic" Version = "0.13.2" + Build = 1 [LinuxAndBSD] Categories = ["Audio", "AudioVideo"] diff --git a/go.mod b/go.mod index cc8a090..2bcf56a 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/supersonic-app/go-subsonic v0.0.0-20241224013245-9b2841f3711d github.com/zalando/go-keyring v0.2.6 golang.org/x/net v0.25.0 - golang.org/x/sys v0.26.0 + golang.org/x/sys v0.27.0 golang.org/x/text v0.21.0 ) @@ -48,18 +48,10 @@ require ( github.com/rymdport/portal v0.3.0 // indirect github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c // indirect github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect -<<<<<<< HEAD - github.com/stretchr/testify v1.9.0 // indirect -======= github.com/stretchr/testify v1.10.0 // indirect ->>>>>>> 287a268 (migrate to Fyne 2.6 - WIP - updates for new threading model) github.com/yuin/goldmark v1.7.1 // indirect golang.org/x/image v0.23.0 // indirect golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a // indirect -<<<<<<< HEAD -======= - golang.org/x/sys v0.27.0 // indirect ->>>>>>> 287a268 (migrate to Fyne 2.6 - WIP - updates for new threading model) gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/main.go b/main.go index 07d5430..96511ea 100644 --- a/main.go +++ b/main.go @@ -79,7 +79,7 @@ func main() { myApp.OnReactivate = mainWindow.Show myApp.OnExit = func() { fyne.Do(mainWindow.Quit) } - fyneApp.Lifecycle().SetOnEnteredForeground(sync.OnceFunc(func() { + windowStartupTasks := sync.OnceFunc(func() { defaultServer := myApp.ServerManager.GetDefaultServer() if defaultServer == nil { mainWindow.Controller.PromptForFirstServer() @@ -87,7 +87,6 @@ func main() { mainWindow.Controller.DoConnectToServerWorkflow(defaultServer) } - startupOnceTasks := sync.OnceFunc(func() { mainWindow.Window.(driver.NativeWindow).RunNative(func(ctx any) { // intialize Windows SMTC if runtime.GOOS == "windows" { @@ -108,9 +107,7 @@ func main() { } }) }) - fyneApp.Lifecycle().SetOnEnteredForeground(func() { - startupOnceTasks() - }) + fyneApp.Lifecycle().SetOnEnteredForeground(windowStartupTasks) mainWindow.ShowAndRun() diff --git a/ui/mainwindow.go b/ui/mainwindow.go index 98818b3..2b999a9 100644 --- a/ui/mainwindow.go +++ b/ui/mainwindow.go @@ -169,8 +169,8 @@ func (m *MainWindow) UpdateOnTrackChange(item mediaprovider.MediaItem) { meta.Name, strings.TrimPrefix(artistDisp, " – "), } - app.ImageManager.GetCoverThumbnail(meta.CoverArtID) - if path, err := app.ImageManager.GetCoverArtPath(meta.CoverArtID); err == nil { + m.App.ImageManager.GetCoverThumbnail(meta.CoverArtID) + if path, err := m.App.ImageManager.GetCoverArtPath(meta.CoverArtID); err == nil { args = append([]string{"--icon", path}, args...) }