feat: hook up workspace list to be displayed in the UI

This commit is contained in:
Ashley Wulber 2022-06-16 13:26:57 -04:00
parent 0d93231453
commit dba44d579f
5 changed files with 29 additions and 6 deletions

View file

@ -86,6 +86,12 @@ pub struct State {
workspace_groups: Vec<WorkspaceGroup>,
}
impl State {
pub fn workspace_list(&self) -> impl Iterator<Item=(String, bool)> + '_ {
self.workspace_groups.iter().map(|g| g.workspaces.iter().map(|w| (w.name.clone(), false))).flatten()
}
}
#[derive(Debug, Clone)]
struct WorkspaceGroup {
workspace_group_handle: ZextWorkspaceGroupHandleV1,