summaryrefslogtreecommitdiffstats
path: root/pkg/gui/updates.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-16 14:46:53 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-17 19:13:40 +1100
commit1dd7307fde033dae5fececac15810a99e26c3d91 (patch)
tree4e851c9e3229a6fe3b4191f6311d05d7a9142960 /pkg/gui/updates.go
parenta90b6efded49abcfa2516db794d7875b0396f558 (diff)
start moving commit panel handlers into controller
more and more move rebase commit refreshing into existing abstraction and more and more WIP and more handling clicks properly fix merge conflicts update cheatsheet lots more preparation to start moving things into controllers WIP better typing expand on remotes controller moving more code into controllers
Diffstat (limited to 'pkg/gui/updates.go')
-rw-r--r--pkg/gui/updates.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/gui/updates.go b/pkg/gui/updates.go
index 5eb08dae3..f3dc14b1d 100644
--- a/pkg/gui/updates.go
+++ b/pkg/gui/updates.go
@@ -8,7 +8,7 @@ import (
)
func (gui *Gui) showUpdatePrompt(newVersion string) error {
- return gui.PopupHandler.Ask(popup.AskOpts{
+ return gui.c.Ask(popup.AskOpts{
Title: "New version available!",
Prompt: fmt.Sprintf("Download version %s? (enter/esc)", newVersion),
HandleConfirm: func() error {
@@ -20,10 +20,10 @@ func (gui *Gui) showUpdatePrompt(newVersion string) error {
func (gui *Gui) onUserUpdateCheckFinish(newVersion string, err error) error {
if err != nil {
- return gui.PopupHandler.Error(err)
+ return gui.c.Error(err)
}
if newVersion == "" {
- return gui.PopupHandler.ErrorMsg("New version not found")
+ return gui.c.ErrorMsg("New version not found")
}
return gui.showUpdatePrompt(newVersion)
}
@@ -31,13 +31,13 @@ func (gui *Gui) onUserUpdateCheckFinish(newVersion string, err error) error {
func (gui *Gui) onBackgroundUpdateCheckFinish(newVersion string, err error) error {
if err != nil {
// ignoring the error for now so that I'm not annoying users
- gui.Log.Error(err.Error())
+ gui.c.Log.Error(err.Error())
return nil
}
if newVersion == "" {
return nil
}
- if gui.UserConfig.Update.Method == "background" {
+ if gui.c.UserConfig.Update.Method == "background" {
gui.startUpdating(newVersion)
return nil
}
@@ -56,7 +56,7 @@ func (gui *Gui) onUpdateFinish(statusId int, err error) error {
gui.OnUIThread(func() error {
_ = gui.renderString(gui.Views.AppStatus, "")
if err != nil {
- return gui.PopupHandler.ErrorMsg("Update failed: " + err.Error())
+ return gui.c.ErrorMsg("Update failed: " + err.Error())
}
return nil
})
@@ -65,7 +65,7 @@ func (gui *Gui) onUpdateFinish(statusId int, err error) error {
}
func (gui *Gui) createUpdateQuitConfirmation() error {
- return gui.PopupHandler.Ask(popup.AskOpts{
+ return gui.c.Ask(popup.AskOpts{
Title: "Currently Updating",
Prompt: "An update is in progress. Are you sure you want to quit?",
HandleConfirm: func() error {