mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
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…
x
Reference in New Issue
Block a user