diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2023-08-28 13:18:58 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2023-09-04 17:50:49 +0200 |
commit | 1106981827f5730ae9e71ff38bde27751fc66213 (patch) | |
tree | b0a12c4412706d428351ab7245726d66f7005649 /pkg/gui/extras_panel.go | |
parent | 1dac4158e9d8c8ab60203c76e9f86af409724823 (diff) |
Extract a SaveAppStateAndLogError function
It seems that most actions that change a state option and resave the state want
to just log the error.
Diffstat (limited to 'pkg/gui/extras_panel.go')
-rw-r--r-- | pkg/gui/extras_panel.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/gui/extras_panel.go b/pkg/gui/extras_panel.go index 5381823b9..1d42f3c92 100644 --- a/pkg/gui/extras_panel.go +++ b/pkg/gui/extras_panel.go @@ -24,9 +24,7 @@ func (gui *Gui) handleCreateExtrasMenuPanel() error { show := !gui.c.State().GetShowExtrasWindow() gui.c.State().SetShowExtrasWindow(show) gui.c.GetAppState().HideCommandLog = !show - if err := gui.c.SaveAppState(); err != nil { - gui.c.Log.Errorf("error when saving app state: %v", err) - } + gui.c.SaveAppStateAndLogError() return nil }, }, |