feat(project): indicate that a project is open in the recent projects list

This commit is contained in:
CJ van den Berg 2025-02-09 19:53:37 +01:00
parent 28e164708e
commit 90192ddf3c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 14 additions and 4 deletions

View file

@ -442,8 +442,11 @@ const Process = struct {
var message = std.ArrayList(u8).init(self.allocator);
const writer = message.writer();
try cbor.writeArrayHeader(writer, recent_projects.items.len);
for (recent_projects.items) |project|
for (recent_projects.items) |project| {
try cbor.writeArrayHeader(writer, 2);
try cbor.writeValue(writer, project.name);
try cbor.writeValue(writer, if (self.projects.get(project.name)) |_| true else false);
}
from.send_raw(.{ .buf = message.items }) catch return error.ClientFailed;
}