fix infinite dialog on network mount failure

This commit is contained in:
Will Sheehan 2026-08-04 23:09:19 -07:00
parent 24e34eaa0f
commit 95035166d3
3 changed files with 19 additions and 9 deletions

View file

@ -2678,10 +2678,14 @@ impl Application for App {
})
&& let Some(mounter) = MOUNTERS.get(&key)
{
return mounter.network_drive(uri.clone()).map(move |()| {
cosmic::Action::App(Message::NetworkDriveOpenEntityAfterMount {
entity,
})
return mounter.network_drive(uri.clone()).map(move |mounted| {
if mounted {
cosmic::Action::App(Message::NetworkDriveOpenEntityAfterMount {
entity,
})
} else {
cosmic::action::none()
}
});
}
@ -3586,7 +3590,7 @@ impl Application for App {
Some((*mounter_key, self.network_drive_input.clone()));
return mounter
.network_drive(self.network_drive_input.clone())
.map(|()| cosmic::action::none());
.map(|_| cosmic::action::none());
}
log::warn!(
"no mounter found for connecting to {:?}",