mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Fix HackerNews row selection issue. Closes #411
This commit is contained in:
parent
5eb21d82b6
commit
fa357294fb
@ -65,7 +65,7 @@ func (widget *Widget) displayStats(project *GerritProject) string {
|
|||||||
|
|
||||||
func (widget *Widget) rowColor(idx int) string {
|
func (widget *Widget) rowColor(idx int) string {
|
||||||
if widget.View.HasFocus() && (idx == widget.selected) {
|
if widget.View.HasFocus() && (idx == widget.selected) {
|
||||||
widget.settings.common.DefaultFocussedRowColor()
|
return widget.settings.common.DefaultFocussedRowColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
return widget.settings.common.RowColor(idx)
|
return widget.settings.common.RowColor(idx)
|
||||||
|
@ -116,7 +116,7 @@ func (widget *Widget) contentFrom(messages []Message) string {
|
|||||||
|
|
||||||
func (widget *Widget) rowColor(idx int) string {
|
func (widget *Widget) rowColor(idx int) string {
|
||||||
if widget.View.HasFocus() && (idx == widget.selected) {
|
if widget.View.HasFocus() && (idx == widget.selected) {
|
||||||
widget.settings.common.DefaultFocussedRowColor()
|
return widget.settings.common.DefaultFocussedRowColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
return widget.settings.common.RowColor(idx)
|
return widget.settings.common.RowColor(idx)
|
||||||
|
@ -74,7 +74,7 @@ func (widget *Widget) Refresh() {
|
|||||||
for idx := 0; idx < widget.settings.numberOfStories; idx++ {
|
for idx := 0; idx < widget.settings.numberOfStories; idx++ {
|
||||||
story, e := GetStory(storyIds[idx])
|
story, e := GetStory(storyIds[idx])
|
||||||
if e != nil {
|
if e != nil {
|
||||||
panic(e)
|
// panic(e)
|
||||||
} else {
|
} else {
|
||||||
stories = append(stories, story)
|
stories = append(stories, story)
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ func (widget *Widget) contentFrom(stories []Story) string {
|
|||||||
|
|
||||||
func (widget *Widget) rowColor(idx int) string {
|
func (widget *Widget) rowColor(idx int) string {
|
||||||
if widget.View.HasFocus() && (idx == widget.selected) {
|
if widget.View.HasFocus() && (idx == widget.selected) {
|
||||||
widget.settings.common.DefaultFocussedRowColor()
|
return widget.settings.common.DefaultFocussedRowColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
return widget.settings.common.RowColor(idx)
|
return widget.settings.common.RowColor(idx)
|
||||||
|
@ -112,7 +112,7 @@ func (widget *Widget) contentFrom(view *View) string {
|
|||||||
|
|
||||||
func (widget *Widget) rowColor(idx int) string {
|
func (widget *Widget) rowColor(idx int) string {
|
||||||
if widget.View.HasFocus() && (idx == widget.selected) {
|
if widget.View.HasFocus() && (idx == widget.selected) {
|
||||||
widget.settings.common.DefaultFocussedRowColor()
|
return widget.settings.common.DefaultFocussedRowColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
return widget.settings.common.RowColor(idx)
|
return widget.settings.common.RowColor(idx)
|
||||||
|
@ -110,7 +110,7 @@ func (widget *Widget) contentFrom(result *Result) string {
|
|||||||
|
|
||||||
func (widget *Widget) rowColor(idx int) string {
|
func (widget *Widget) rowColor(idx int) string {
|
||||||
if widget.View.HasFocus() && (idx == widget.selected) {
|
if widget.View.HasFocus() && (idx == widget.selected) {
|
||||||
widget.settings.common.DefaultFocussedRowColor()
|
return widget.settings.common.DefaultFocussedRowColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
return widget.settings.common.RowColor(idx)
|
return widget.settings.common.RowColor(idx)
|
||||||
|
@ -102,7 +102,7 @@ func (widget *Widget) contentFrom(builds *Builds) string {
|
|||||||
|
|
||||||
func (widget *Widget) rowColor(idx int) string {
|
func (widget *Widget) rowColor(idx int) string {
|
||||||
if widget.View.HasFocus() && (idx == widget.selected) {
|
if widget.View.HasFocus() && (idx == widget.selected) {
|
||||||
widget.settings.common.DefaultFocussedRowColor()
|
return widget.settings.common.DefaultFocussedRowColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
return widget.settings.common.RowColor(idx)
|
return widget.settings.common.RowColor(idx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user