1
0
Fork 0
mirror of https://github.com/archtechx/todo-system.git synced 2025-12-12 17:14:03 +00:00

render: only show Other section if there are any entries

This commit is contained in:
Samuel Štancl 2025-09-13 22:21:48 +02:00
parent d4bf97ce12
commit ea031d81f0

View file

@ -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();
}
} }
} }