mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
add a case where subreddit link length is less than widet.settings.numberOfPosts (#754)
This commit is contained in:
parent
c8a14e7685
commit
307d8aead0
@ -44,10 +44,16 @@ func (widget *Widget) Refresh() {
|
||||
widget.links = nil
|
||||
widget.SetItemCount(0)
|
||||
} else {
|
||||
widget.links = links[:widget.settings.numberOfPosts]
|
||||
widget.SetItemCount(len(widget.links))
|
||||
widget.err = nil
|
||||
}
|
||||
if len(links) <= widget.settings.numberOfPosts {
|
||||
widget.links = links
|
||||
widget.SetItemCount(len(widget.links))
|
||||
widget.err = nil
|
||||
} else {
|
||||
widget.links = links[:widget.settings.numberOfPosts]
|
||||
widget.SetItemCount(len(widget.links))
|
||||
widget.err = nil
|
||||
}
|
||||
}
|
||||
widget.Render()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user