Fix Clock crash on empty string in timezones field

Also fixed timezones behavior: now waybar starting with the first timezone in timezones list and falling back to timezone field only if timezones omit or has no elements.
This commit is contained in:
Sergey Mishin
2021-10-03 03:27:54 +00:00
parent 8b4dafd701
commit 174db444d6
3 changed files with 22 additions and 12 deletions

View File

@ -37,6 +37,7 @@ class Clock : public ALabel {
auto calendar_text(const waybar_time& wtime) -> std::string;
auto weekdays_header(const date::weekday& first_dow, std::ostream& os) -> void;
auto first_day_of_week() -> date::weekday;
bool setTimeZone(Json::Value zone_name);
};
} // namespace waybar::modules