refactor: call parent update

This commit is contained in:
Alex
2020-04-12 18:30:21 +02:00
parent 0f0765e517
commit b40cdcb5bd
17 changed files with 39 additions and 53 deletions

View File

@ -228,11 +228,6 @@ const std::string waybar::modules::Network::getNetworkState() const {
}
auto waybar::modules::Network::update() -> void {
// Run user-provided update handler if configured
if (config_["on-update"].isString()) {
AModule::update();
}
std::lock_guard<std::mutex> lock(mutex_);
std::string tooltip_format;
auto down_octets = read_netstat(BANDWIDTH_CATEGORY, BANDWIDTH_DOWN_TOTAL_KEY);
@ -314,6 +309,9 @@ auto waybar::modules::Network::update() -> void {
label_.set_tooltip_text(text);
}
}
// Call parent update
ALabel::update();
}
// Based on https://gist.github.com/Yawning/c70d804d4b8ae78cc698