fix: #153 show a loading message when loading directory's content (#180)

This commit is contained in:
Christian Visintin
2023-05-09 17:43:37 +02:00
committed by GitHub
parent 9dab34e7ee
commit 5a67fc7b0e
2 changed files with 16 additions and 0 deletions

View File

@@ -112,17 +112,25 @@ impl FileTransferActivity {
pub(super) fn reload_remote_dir(&mut self) {
// Get current entries
if let Ok(wrkdir) = self.client.pwd() {
self.mount_blocking_wait("Loading remote directory...");
self.remote_scan(wrkdir.as_path());
// Set wrkdir
self.remote_mut().wrkdir = wrkdir;
self.umount_wait();
}
}
/// Reload local directory entries and update browser
pub(super) fn reload_local_dir(&mut self) {
self.mount_blocking_wait("Loading local directory...");
let wrkdir: PathBuf = self.host.pwd();
self.local_scan(wrkdir.as_path());
self.local_mut().wrkdir = wrkdir;
self.umount_wait();
}
/// Scan current local directory