Only show count when we have terminals

Petros Amoiridis and Mikayla Maki created

Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>

Change summary

crates/terminal_view/src/terminal_button.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Detailed changes

crates/terminal_view/src/terminal_button.rs 🔗

@@ -79,13 +79,13 @@ impl View for TerminalButton {
                                     .aligned()
                                     .named("terminals-icon"),
                             )
-                            .with_child(
+                            .with_children(has_terminals.then(|| {
                                 Label::new(terminal_count.to_string(), style.label.text.clone())
                                     .contained()
                                     .with_style(style.label.container)
                                     .aligned()
-                                    .boxed(),
-                            )
+                                    .boxed()
+                            }))
                             .constrained()
                             .with_height(style.icon_size)
                             .contained()