move saving play queue to window close intercept instead of app exit in case we crash during exit tasks

This commit is contained in:
Drew Weymouth
2024-08-19 08:46:44 -07:00
parent cf01553974
commit 6075b5c82e
2 changed files with 14 additions and 9 deletions
+1
View File
@@ -140,6 +140,7 @@ func NewMainWindow(fyneApp fyne.App, appName, displayAppName, appVersion string,
m.Window.SetContent(fynetooltip.AddWindowToolTipLayer(m.container, m.Window.Canvas()))
m.setInitialSize()
m.Window.SetCloseIntercept(func() {
app.SavePlayQueueIfEnabled()
m.SaveWindowSize()
if app.Config.Application.CloseToSystemTray && m.HaveSystemTray() {
m.Window.Hide()