refactor(custon): avoid useless logic
This commit is contained in:
parent
be2fa743eb
commit
6e69af8967
|
@ -102,7 +102,9 @@ auto waybar::modules::Custom::update() -> void {
|
|||
} else {
|
||||
parseOutputRaw();
|
||||
}
|
||||
|
||||
if (text_.empty()) {
|
||||
event_box_.hide();
|
||||
} else {
|
||||
auto str = fmt::format(format_,
|
||||
text_,
|
||||
fmt::arg("alt", alt_),
|
||||
|
@ -123,9 +125,6 @@ auto waybar::modules::Custom::update() -> void {
|
|||
for (auto const& c : class_) {
|
||||
label_.get_style_context()->add_class(c);
|
||||
}
|
||||
if (text_.empty()) {
|
||||
event_box_.hide();
|
||||
} else {
|
||||
event_box_.show();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue