diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 11:13:51 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 5cdfd41dca3ee2c080e8f3d40cfdc147e0b8a595 (patch) | |
tree | 26c4df768f18599046dbb319ab25029b947c1959 /pkg/gui | |
parent | a95fd581fde17651151e4fb0b34494447e07c959 (diff) |
prevent spamming pull or push buttons
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/files_panel.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 488b7f569..4f52cb86c 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -425,6 +425,10 @@ func (gui *Gui) refreshStateFiles() error { } func (gui *Gui) handlePullFiles(g *gocui.Gui, v *gocui.View) error { + if gui.popupPanelFocused() { + return nil + } + // if we have no upstream branch we need to set that first currentBranch := gui.currentBranch() if currentBranch.Pullables == "?" { @@ -526,6 +530,10 @@ func (gui *Gui) pushWithForceFlag(v *gocui.View, force bool, upstream string, ar } func (gui *Gui) pushFiles(g *gocui.Gui, v *gocui.View) error { + if gui.popupPanelFocused() { + return nil + } + // if we have pullables we'll ask if the user wants to force push currentBranch := gui.currentBranch() |