chore: dont show extra info in InfoRow when the value is unknown

This commit is contained in:
Ilya Zlobintsev
2024-12-26 12:41:28 +02:00
parent 4fe3c9882e
commit a7b29afe60

View File

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