From c7ff101e08c4f7dbaa7e18f149562e7a4f8648a5 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Mon, 14 May 2018 12:12:07 -0700 Subject: [PATCH] Apparently I'm easily confused by comparison operators --- github/display.go | 2 +- github/widget.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/github/display.go b/github/display.go index 089b7348..045f3b8b 100644 --- a/github/display.go +++ b/github/display.go @@ -51,7 +51,7 @@ func (widget *Widget) openPRs(repo *GithubRepo, username string) string { } func (widget *Widget) prsForReview(repo *GithubRepo, username string) string { - if len(repo.PullRequests) > 0 { + if len(repo.PullRequests) == 0 { return " [grey]none[white]\n" } diff --git a/github/widget.go b/github/widget.go index 0cfc04e2..abb2e6d1 100644 --- a/github/widget.go +++ b/github/widget.go @@ -17,6 +17,7 @@ const helpText = ` /: Show/hide this help window h: Previous git repository l: Next git repository + r: Refresh the data arrow left: Previous git repository arrow right: Next git repository @@ -104,6 +105,9 @@ func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey { case "l": widget.Next() return nil + case "r": + widget.Refresh() + return nil } switch event.Key() {