From 7e7dc68e5a0d8463b69755e006fdd463b295fc65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20V=C3=A1rady?= Date: Sat, 28 Jan 2017 18:30:01 +0100 Subject: [PATCH] fix(github): Hide label if 'empty-notifications' is disabled Before the first update(), the label should stay 'hidden'. --- src/modules/github.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/github.cpp b/src/modules/github.cpp index 4a69d33b..9eb04379 100644 --- a/src/modules/github.cpp +++ b/src/modules/github.cpp @@ -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(); + } } }