mirror of
https://github.com/polybar/polybar.git
synced 2024-11-11 13:50:56 -05:00
fix(github): Hide label if 'empty-notifications' is disabled
Before the first update(), the label should stay 'hidden'.
This commit is contained in:
parent
501921ef12
commit
7e7dc68e5a
1 changed files with 6 additions and 1 deletions
|
@ -24,7 +24,12 @@ namespace modules {
|
|||
|
||||
if (m_formatter->has(TAG_LABEL)) {
|
||||
m_label = load_optional_label(m_conf, name(), TAG_LABEL, "Notifications: %notifications%");
|
||||
m_label->replace_token("%notifications%", m_empty_notifications ? "0" : "");
|
||||
|
||||
if (m_empty_notifications) {
|
||||
m_label->replace_token("%notifications%", "0");
|
||||
} else {
|
||||
m_label->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue