fix: rename workspace active fix

This commit is contained in:
Austin Horstman 2023-09-08 14:11:02 -05:00
parent 38ef38b72f
commit 2837b72064
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -163,6 +163,9 @@ void Workspaces::onEvent(const std::string &ev) {
std::string new_name = payload.substr(payload.find(',') + 1); std::string new_name = payload.substr(payload.find(',') + 1);
for (auto &workspace : workspaces_) { for (auto &workspace : workspaces_) {
if (workspace->id() == workspace_id) { if (workspace->id() == workspace_id) {
if (workspace->name() == active_workspace_name_) {
active_workspace_name_ = new_name;
}
workspace->set_name(new_name); workspace->set_name(new_name);
break; break;
} }