mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
fixing an issue where after a refresh the maxItems would be greater than the actual amount
This commit is contained in:
parent
d212037ff5
commit
70c5e02ca9
@ -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
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user