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

Fix double-render of title in Weather

This commit is contained in:
Chris Cummer 2019-05-10 08:09:50 -07:00
parent 018d2af3ae
commit 68ed842c87
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ func (widget *Widget) display() {
} }
title := widget.CommonSettings.Title title := widget.CommonSettings.Title
var content string var content string
if err != "" { if err != "" {
content = err content = err
@ -74,5 +75,6 @@ func (widget *Widget) temperatures(cityData *owm.CurrentWeatherData) string {
func (widget *Widget) title(cityData *owm.CurrentWeatherData) string { func (widget *Widget) title(cityData *owm.CurrentWeatherData) string {
str := fmt.Sprintf("%s %s", widget.emojiFor(cityData), cityData.Name) str := fmt.Sprintf("%s %s", widget.emojiFor(cityData), cityData.Name)
return widget.ContextualTitle(str) return str
// return widget.ContextualTitle(str)
} }

View File

@ -131,7 +131,6 @@ func (widget *TextWidget) addView() *tview.TextView {
view.SetBorder(true) view.SetBorder(true)
view.SetDynamicColors(true) view.SetDynamicColors(true)
view.SetTitle(widget.ContextualTitle(widget.CommonSettings.Title))
view.SetWrap(false) view.SetWrap(false)
return view return view