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:
parent
018d2af3ae
commit
68ed842c87
@ -24,6 +24,7 @@ func (widget *Widget) display() {
|
||||
}
|
||||
|
||||
title := widget.CommonSettings.Title
|
||||
|
||||
var content string
|
||||
if err != "" {
|
||||
content = err
|
||||
@ -74,5 +75,6 @@ func (widget *Widget) temperatures(cityData *owm.CurrentWeatherData) string {
|
||||
|
||||
func (widget *Widget) title(cityData *owm.CurrentWeatherData) string {
|
||||
str := fmt.Sprintf("%s %s", widget.emojiFor(cityData), cityData.Name)
|
||||
return widget.ContextualTitle(str)
|
||||
return str
|
||||
// return widget.ContextualTitle(str)
|
||||
}
|
||||
|
@ -131,7 +131,6 @@ func (widget *TextWidget) addView() *tview.TextView {
|
||||
|
||||
view.SetBorder(true)
|
||||
view.SetDynamicColors(true)
|
||||
view.SetTitle(widget.ContextualTitle(widget.CommonSettings.Title))
|
||||
view.SetWrap(false)
|
||||
|
||||
return view
|
||||
|
Loading…
x
Reference in New Issue
Block a user