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

Update title handling so that config based title can be used

There is already default handling of title. Remove instances where people are unknowingly overriding it
For instances where we want to set special things, make sure to use CommonSettings.Title, so people can still override
This commit is contained in:
Sean Smith
2019-04-27 23:40:38 -04:00
committed by Chris Cummer
parent 305dd78ad4
commit 17d53ca39a
25 changed files with 21 additions and 36 deletions

View File

@@ -69,7 +69,6 @@ func (widget *Widget) Refresh() {
if err != nil {
widget.View.SetWrap(true)
widget.View.SetTitle(widget.Name())
widget.View.SetText(err.Error())
} else {
var stories []Story
@@ -100,7 +99,7 @@ func (widget *Widget) display() {
widget.View.SetWrap(false)
widget.View.Clear()
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %sstories", widget.Name(), widget.settings.storyType)))
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %sstories", widget.CommonSettings.Title, widget.settings.storyType)))
widget.View.SetText(widget.contentFrom(widget.stories))
widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight()
}