Do not attach empty URI to mounter items, fixes #1079, fixes #1085

This commit is contained in:
Jeremy Soller 2025-07-19 12:04:11 -06:00
parent 0a9bcdd5fd
commit 05ea61ed72
No known key found for this signature in database
GPG key ID: 670FDFB5428E05CA

View file

@ -1461,15 +1461,11 @@ impl App {
for (i, (key, item)) in nav_items.into_iter().enumerate() {
nav_model = nav_model.insert(|mut b| {
b = b.text(item.name()).data(MounterData(key, item.clone()));
let uri = item.uri().to_string();
if let Some(path) = item.path() {
b = b.data(Location::Network(
item.uri().to_string(),
item.name(),
Some(path),
));
} else {
println!("{:?}: {:?}", item.name(), item.uri());
b = b.data(Location::Network(item.uri().to_string(), item.name(), None));
b = b.data(Location::Network(uri, item.name(), Some(path)));
} else if !uri.is_empty() {
b = b.data(Location::Network(uri, item.name(), None));
}
if let Some(icon) = item.icon(true) {
b = b.icon(widget::icon::icon(icon).size(16));