From 70c5e02ca98c5844aaae481415cc87577f8bbffd Mon Sep 17 00:00:00 2001 From: Joel Valentine Date: Sat, 31 Aug 2019 16:39:33 +0100 Subject: [PATCH] fixing an issue where after a refresh the maxItems would be greater than the actual amount --- modules/github/display.go | 2 ++ modules/github/widget.go | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/github/display.go b/modules/github/display.go index e3241d61..d896f51c 100644 --- a/modules/github/display.go +++ b/modules/github/display.go @@ -12,6 +12,8 @@ func (widget *Widget) display() { func (widget *Widget) content() (string, string, bool) { repo := widget.currentGithubRepo() + widget.Unselect() + title := fmt.Sprintf("%s - %s", widget.CommonSettings().Title, widget.title(repo)) if repo == nil { return title, " GitHub repo data is unavailable ", false diff --git a/modules/github/widget.go b/modules/github/widget.go index dce52c3a..8a2f6403 100644 --- a/modules/github/widget.go +++ b/modules/github/widget.go @@ -76,9 +76,6 @@ func (widget *Widget) Prev() { func (widget *Widget) Unselect() { widget.Selected = -1 - if widget.DisplayFunction != nil { - widget.SetDisplayFunction(widget.display) - } } func (widget *Widget) Refresh() {