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

@ -13,11 +13,6 @@ waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config)
}
auto waybar::modules::Clock::update() -> void {
// Run user-provided update handler if configured
if (config_["on-update"].isString()) {
AModule::update();
}
tzset(); // Update timezone information
auto now = std::chrono::system_clock::now();
auto localtime = fmt::localtime(std::chrono::system_clock::to_time_t(now));
@ -33,4 +28,6 @@ auto waybar::modules::Clock::update() -> void {
label_.set_tooltip_text(text);
}
}
// Call parent update
ALabel::update();
}