mirror of
https://github.com/archtechx/todo-system.git
synced 2025-12-12 00:54:03 +00:00
render: only show Other section if there are any entries
This commit is contained in:
parent
d4bf97ce12
commit
ea031d81f0
1 changed files with 7 additions and 6 deletions
|
|
@ -113,13 +113,14 @@ pub fn render_entries(entries: Vec<Entry>) {
|
||||||
println!();
|
println!();
|
||||||
}
|
}
|
||||||
|
|
||||||
write_ansi(&mut stdout, Color::White, "## Other", true);
|
if generic_entries.len() > 0 {
|
||||||
writeln!(stdout).unwrap();
|
write_ansi(&mut stdout, Color::White, "## Other", true);
|
||||||
|
writeln!(stdout).unwrap();
|
||||||
|
|
||||||
generic_entries.sort_by(|a, b| a.text.partial_cmp(&b.text).unwrap());
|
generic_entries.sort_by(|a, b| a.text.partial_cmp(&b.text).unwrap());
|
||||||
|
|
||||||
for item in generic_entries {
|
for item in generic_entries {
|
||||||
item.render();
|
item.render();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue