dont allow the user to bring up the command desc if there is none (#753)

* dont allow the user to bring up the command desc if there is none

* obey our god lints

---------

Co-authored-by: nyx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
nyx 2024-10-31 14:42:06 -04:00 committed by GitHub
parent 52565e5ea1
commit 72dfb29969
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -704,8 +704,10 @@ impl AppState {
fn enable_description(&mut self) { fn enable_description(&mut self) {
if let Some(command_description) = self.get_selected_description() { if let Some(command_description) = self.get_selected_description() {
let description = FloatingText::new(command_description, "Command Description"); if !command_description.is_empty() {
self.spawn_float(description, 80, 80); let description = FloatingText::new(command_description, "Command Description");
self.spawn_float(description, 80, 80);
}
} }
} }