[fix] always return a list, even empty

This commit is contained in:
me 2020-01-31 11:19:59 +02:00
parent f5f09bdb1b
commit e2bc263520

View file

@ -344,10 +344,10 @@ class WidgetDrawer(object):
"""
full_text = widget.full_text()
if widget.get_module() and widget.get_module().hidden():
return
return []
if widget.get_module() and widget.get_module().name in self._config.autohide():
if not any(state in widget.state() for state in ["warning", "critical"]):
return
return []
padding = self._theme.padding(widget)
prefix = self._theme.prefix(widget, padding)