fix(Workspaces): fix concurrence and move json parser to ipc client

This commit is contained in:
Alex
2019-04-23 11:41:49 +02:00
parent 07dba791cf
commit cccf60c30e
10 changed files with 82 additions and 77 deletions

View File

@ -16,9 +16,8 @@ Mode::Mode(const std::string& id, const Bar& bar, const Json::Value& config)
}
void Mode::onEvent(const struct Ipc::ipc_response res) {
auto parsed = parser_.parse(res.payload);
if (parsed["change"] != "default") {
mode_ = parsed["change"].asString();
if (res.payload["change"] != "default") {
mode_ = res.payload["change"].asString();
} else {
mode_.clear();
}