diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-04-14 15:10:17 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-04-18 10:10:30 +0200 |
commit | 5396a706611220077d32d01058d5e4b025eab0de (patch) | |
tree | 6aff65ed63fe08f470e62ea0b8ae31e65bfc318f /pkg/gui/popup/popup_handler.go | |
parent | 82a3d33ce3e089bc103ec09b33b3ed7f47ac1381 (diff) |
Clean up error handling of WithWaitingStatus and WithWaitingStatusSync
Diffstat (limited to 'pkg/gui/popup/popup_handler.go')
-rw-r--r-- | pkg/gui/popup/popup_handler.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkg/gui/popup/popup_handler.go b/pkg/gui/popup/popup_handler.go index 40a664c0e..c8ff10d85 100644 --- a/pkg/gui/popup/popup_handler.go +++ b/pkg/gui/popup/popup_handler.go @@ -18,7 +18,7 @@ type PopupHandler struct { currentContextFn func() types.Context createMenuFn func(types.CreateMenuOptions) error withWaitingStatusFn func(message string, f func(gocui.Task) error) - withWaitingStatusSyncFn func(message string, f func() error) + withWaitingStatusSyncFn func(message string, f func() error) error toastFn func(message string, kind types.ToastKind) getPromptInputFn func() string inDemo func() bool @@ -34,7 +34,7 @@ func NewPopupHandler( currentContextFn func() types.Context, createMenuFn func(types.CreateMenuOptions) error, withWaitingStatusFn func(message string, f func(gocui.Task) error), - withWaitingStatusSyncFn func(message string, f func() error), + withWaitingStatusSyncFn func(message string, f func() error) error, toastFn func(message string, kind types.ToastKind), getPromptInputFn func() string, inDemo func() bool, @@ -76,8 +76,7 @@ func (self *PopupHandler) WithWaitingStatus(message string, f func(gocui.Task) e } func (self *PopupHandler) WithWaitingStatusSync(message string, f func() error) error { - self.withWaitingStatusSyncFn(message, f) - return nil + return self.withWaitingStatusSyncFn(message, f) } func (self *PopupHandler) Error(err error) error { |