directly navigate to the mounted drive after mounting them with a click on the sidebar
This commit is contained in:
parent
26e223c4f0
commit
0fc6596681
2 changed files with 34 additions and 1 deletions
10
src/app.rs
10
src/app.rs
|
|
@ -3092,6 +3092,16 @@ impl Application for App {
|
|||
Message::MountResult(mounter_key, item, res) => match res {
|
||||
Ok(true) => {
|
||||
log::info!("connected to {item:?}");
|
||||
// Automatically navigate to the mounted location
|
||||
if let Some(path) = item.path() {
|
||||
let location = if item.is_remote() {
|
||||
Location::Network(item.uri(), item.name(), Some(path))
|
||||
} else {
|
||||
Location::Path(path)
|
||||
};
|
||||
let message = Message::TabMessage(None, tab::Message::Location(location));
|
||||
return self.update(message);
|
||||
}
|
||||
}
|
||||
Ok(false) => {
|
||||
log::info!("cancelled connection to {item:?}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue