diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-02 19:20:40 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | 798d3e2d54e828f25ed4aadcefff11593fa23e10 (patch) | |
tree | 3b68eedd78e13836da8d7b8c46c5862c458f02a0 /pkg/gui/credentials_panel.go | |
parent | e8f99c3326f543b713cafb6420a5b9c3c9b4d50c (diff) |
get rid of these positively ghastly method signatures
Diffstat (limited to 'pkg/gui/credentials_panel.go')
-rw-r--r-- | pkg/gui/credentials_panel.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/gui/credentials_panel.go b/pkg/gui/credentials_panel.go index fe97dc9aa..d79d4cf67 100644 --- a/pkg/gui/credentials_panel.go +++ b/pkg/gui/credentials_panel.go @@ -39,10 +39,11 @@ func (gui *Gui) promptUserForCredential(passOrUname string) string { return userInput + "\n" } -func (gui *Gui) handleSubmitCredential(g *gocui.Gui, v *gocui.View) error { - message := gui.trimmedContent(v) +func (gui *Gui) handleSubmitCredential() error { + credentialsView := gui.getCredentialsView() + message := gui.trimmedContent(credentialsView) gui.credentials <- message - gui.clearEditorView(v) + gui.clearEditorView(credentialsView) if err := gui.returnFromContext(); err != nil { return err } @@ -50,7 +51,7 @@ func (gui *Gui) handleSubmitCredential(g *gocui.Gui, v *gocui.View) error { return gui.refreshSidePanels(refreshOptions{}) } -func (gui *Gui) handleCloseCredentialsView(g *gocui.Gui, v *gocui.View) error { +func (gui *Gui) handleCloseCredentialsView() error { gui.credentials <- "" return gui.returnFromContext() } |