1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

adding back padding

This commit is contained in:
Joel Valentine 2019-08-31 19:24:24 +01:00
parent b98ce54750
commit cbae7449b0

View File

@ -12,14 +12,17 @@ func (widget *Widget) display() {
func (widget *Widget) content() (string, string, bool) { func (widget *Widget) content() (string, string, bool) {
repo := widget.currentGithubRepo() repo := widget.currentGithubRepo()
username := widget.settings.username
// Choses the correct place to scroll to when changing sources
if len(widget.View.GetHighlights()) > 0 { if len(widget.View.GetHighlights()) > 0 {
widget.View.ScrollToHighlight() widget.View.ScrollToHighlight()
} else { } else {
widget.View.ScrollToBeginning() widget.View.ScrollToBeginning()
} }
widget.SetItemCount(len(repo.myReviewRequests((widget.settings.username)))) // initial maxItems count
widget.SetItemCount(len(repo.myReviewRequests((username))))
title := fmt.Sprintf("%s - %s", widget.CommonSettings().Title, widget.title(repo)) title := fmt.Sprintf("%s - %s", widget.CommonSettings().Title, widget.title(repo))
if repo == nil { if repo == nil {
@ -31,9 +34,9 @@ func (widget *Widget) content() (string, string, bool) {
str += " [red]Stats[white]\n" str += " [red]Stats[white]\n"
str += widget.displayStats(repo) str += widget.displayStats(repo)
str += "\n [red]Open Review Requests[white]\n" str += "\n [red]Open Review Requests[white]\n"
str += widget.displayMyReviewRequests(repo, widget.settings.username) str += widget.displayMyReviewRequests(repo, username)
str += "\n [red]My Pull Requests[white]\n" str += "\n [red]My Pull Requests[white]\n"
str += widget.displayMyPullRequests(repo, widget.settings.username) str += widget.displayMyPullRequests(repo, username)
for _, customQuery := range widget.settings.customQueries { for _, customQuery := range widget.settings.customQueries {
str += fmt.Sprintf("\n [red]%s[white]\n", customQuery.title) str += fmt.Sprintf("\n [red]%s[white]\n", customQuery.title)
str += widget.displayCustomQuery(repo, customQuery.filter, customQuery.perPage) str += widget.displayCustomQuery(repo, customQuery.filter, customQuery.perPage)