From a7b29afe60c4815cb7b488ab91c7a7132aeb3ee6 Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Thu, 26 Dec 2024 12:41:28 +0200 Subject: [PATCH] chore: dont show extra info in InfoRow when the value is unknown --- lact-gui/src/app/info_row.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lact-gui/src/app/info_row.rs b/lact-gui/src/app/info_row.rs index d9cfbc8..6f0b216 100644 --- a/lact-gui/src/app/info_row.rs +++ b/lact-gui/src/app/info_row.rs @@ -84,6 +84,17 @@ mod imp { .transform_to(|_, text: String| Some(!text.is_empty())) .sync_create() .build(); + + obj.bind_property("value", &self.info_menubutton.get(), "visible") + .transform_to(|_, text: String| { + if text.starts_with("Unknown ") { + Some(false) + } else { + None + } + }) + .sync_create() + .build(); } }