mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(workspaces): add int comparison
This commit is contained in:
parent
b97ca2ec9b
commit
7f7ebb5367
@ -88,6 +88,9 @@ void Workspaces::onCmd(const struct Ipc::ipc_response &res) {
|
||||
std::sort(workspaces_.begin(),
|
||||
workspaces_.end(),
|
||||
[](const Json::Value &lhs, const Json::Value &rhs) {
|
||||
if (lhs["name"].isInt() && rhs["name"].isInt()) {
|
||||
return lhs["name"].asInt() < rhs["name"].asInt();
|
||||
}
|
||||
return lhs["name"].asString() < rhs["name"].asString();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user