Filter out empty projects in contacts panel
This commit is contained in:
parent
ef868ff023
commit
4e9924c717
2 changed files with 126 additions and 113 deletions
|
@ -501,6 +501,12 @@ impl Contact {
|
|||
}
|
||||
Ok(Self { user, projects })
|
||||
}
|
||||
|
||||
pub fn non_empty_projects(&self) -> impl Iterator<Item = &ProjectMetadata> {
|
||||
self.projects
|
||||
.iter()
|
||||
.filter(|project| !project.worktree_root_names.is_empty())
|
||||
}
|
||||
}
|
||||
|
||||
async fn fetch_avatar(http: &dyn HttpClient, url: &str) -> Result<Arc<ImageData>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue