Skip to content

Commit

Permalink
Fix window maximized state not being saved
Browse files Browse the repository at this point in the history
  • Loading branch information
mircearoata committed Oct 15, 2024
1 parent 7edb3db commit f1d2a5c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/app/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (a *app) saveWindowState() {
}
w, h := wailsRuntime.WindowGetSize(common.AppContext)
x, y := wailsRuntime.WindowGetPosition(common.AppContext)
maximized := wailsRuntime.WindowIsMaximised(common.AppContext)
changed := false
if a.IsExpanded {
if w != settings.Settings.ExpandedSize.Width {
Expand Down Expand Up @@ -102,6 +103,10 @@ func (a *app) saveWindowState() {
changed = true
}
}
if maximized != settings.Settings.Maximized {
settings.Settings.Maximized = maximized
changed = true
}
if changed {
err := settings.SaveSettings()
if err != nil {
Expand Down

0 comments on commit f1d2a5c

Please sign in to comment.