mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Issue#1556. Battery module: wrong string comparison
1. battery.hpp - added local bool variable. Force to print warnings the only once in order to warn user about wrong battery configuraion. And does not bring a mess when the battery is turned off (gamepads, etc.) 2. dir_name is an object which takes a part in comparison. So converted to the string.
This commit is contained in:
@ -46,6 +46,7 @@ class Battery : public ALabel {
|
||||
int global_watch_fd_;
|
||||
std::mutex battery_list_mutex_;
|
||||
std::string old_status_;
|
||||
bool warnFirstTime_{true};
|
||||
|
||||
util::SleeperThread thread_;
|
||||
util::SleeperThread thread_battery_update_;
|
||||
|
Reference in New Issue
Block a user