fix: Don't log error for not finding header when running in headless mode (#3112)
parent
b3cd073938
commit
582cca37d6
|
|
@ -123,11 +123,13 @@ func (a *App) StylesChanged(s *config.Styles) {
|
||||||
a.Main.SetBackgroundColor(s.BgColor())
|
a.Main.SetBackgroundColor(s.BgColor())
|
||||||
if f, ok := a.Main.GetPrimitive("main").(*tview.Flex); ok {
|
if f, ok := a.Main.GetPrimitive("main").(*tview.Flex); ok {
|
||||||
f.SetBackgroundColor(s.BgColor())
|
f.SetBackgroundColor(s.BgColor())
|
||||||
|
if !a.Config.K9s.IsHeadless() {
|
||||||
if h, ok := f.ItemAt(0).(*tview.Flex); ok {
|
if h, ok := f.ItemAt(0).(*tview.Flex); ok {
|
||||||
h.SetBackgroundColor(s.BgColor())
|
h.SetBackgroundColor(s.BgColor())
|
||||||
} else {
|
} else {
|
||||||
log.Error().Msgf("Header not found")
|
log.Error().Msgf("Header not found")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.Error().Msgf("Main not found")
|
log.Error().Msgf("Main not found")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue