mirror of
https://github.com/rad4day/Waybar.git
synced 2025-09-15 23:22:31 +02:00
refactor(modules): prefer sigc::mem_fun
This commit is contained in:
@@ -10,9 +10,7 @@ waybar::modules::Custom::Custom(std::string name, Json::Value config)
|
||||
}
|
||||
int interval = _config["interval"] ? _config["inveral"].asInt() : 30;
|
||||
_thread = [this, interval] {
|
||||
Glib::signal_idle().connect_once([this] {
|
||||
update();
|
||||
});
|
||||
Glib::signal_idle().connect_once(sigc::mem_fun(*this, &Custom::update));
|
||||
_thread.sleep_for(chrono::seconds(interval));
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user