diff --git a/src/ui/activities/filetransfer/actions/change_dir.rs b/src/ui/activities/filetransfer/actions/change_dir.rs index b4e17c6..bc4e6f7 100644 --- a/src/ui/activities/filetransfer/actions/change_dir.rs +++ b/src/ui/activities/filetransfer/actions/change_dir.rs @@ -42,7 +42,7 @@ impl FileTransferActivity { /// Enter a directory on local host from entry pub(crate) fn action_enter_local_dir(&mut self, dir: Directory) { self.local_changedir(dir.path.as_path(), true); - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { self.synchronize_browsing(SyncBrowsingDestination::Path(dir.name)); } } @@ -50,7 +50,7 @@ impl FileTransferActivity { /// Enter a directory on local host from entry pub(crate) fn action_enter_remote_dir(&mut self, dir: Directory) { self.remote_changedir(dir.path.as_path(), true); - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { self.synchronize_browsing(SyncBrowsingDestination::Path(dir.name)); } } @@ -60,7 +60,7 @@ impl FileTransferActivity { let dir_path: PathBuf = self.local_to_abs_path(PathBuf::from(input.as_str()).as_path()); self.local_changedir(dir_path.as_path(), true); // Check whether to sync - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { self.synchronize_browsing(SyncBrowsingDestination::Path(input)); } } @@ -70,7 +70,7 @@ impl FileTransferActivity { let dir_path: PathBuf = self.remote_to_abs_path(PathBuf::from(input.as_str()).as_path()); self.remote_changedir(dir_path.as_path(), true); // Check whether to sync - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { self.synchronize_browsing(SyncBrowsingDestination::Path(input)); } } @@ -80,7 +80,7 @@ impl FileTransferActivity { if let Some(d) = self.local_mut().popd() { self.local_changedir(d.as_path(), false); // Check whether to sync - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { self.synchronize_browsing(SyncBrowsingDestination::PreviousDir); } } @@ -91,7 +91,7 @@ impl FileTransferActivity { if let Some(d) = self.remote_mut().popd() { self.remote_changedir(d.as_path(), false); // Check whether to sync - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { self.synchronize_browsing(SyncBrowsingDestination::PreviousDir); } } @@ -105,7 +105,7 @@ impl FileTransferActivity { if let Some(parent) = path.as_path().parent() { self.local_changedir(parent, true); // If sync is enabled update remote too - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { self.synchronize_browsing(SyncBrowsingDestination::ParentDir); } } @@ -121,7 +121,7 @@ impl FileTransferActivity { if let Some(parent) = path.as_path().parent() { self.remote_changedir(parent, true); // If sync is enabled update local too - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { self.synchronize_browsing(SyncBrowsingDestination::ParentDir); } } diff --git a/src/ui/activities/filetransfer/update.rs b/src/ui/activities/filetransfer/update.rs index de43b69..9bb9315 100644 --- a/src/ui/activities/filetransfer/update.rs +++ b/src/ui/activities/filetransfer/update.rs @@ -112,7 +112,7 @@ impl FileTransferActivity { if let SelectedEntry::One(entry) = self.get_local_selected_entries() { self.action_submit_local(entry); // Update file list if sync - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { let _ = self.update_remote_filelist(); } self.update_local_filelist(); @@ -122,7 +122,7 @@ impl FileTransferActivity { if let SelectedEntry::One(entry) = self.get_remote_selected_entries() { self.action_submit_remote(entry); // Update file list if sync - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { let _ = self.update_local_filelist(); } self.update_remote_filelist(); @@ -161,7 +161,7 @@ impl FileTransferActivity { // Umount self.umount_goto(); // Reload files if sync - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { self.update_browser_file_list_swapped(); } // Reload files @@ -171,7 +171,7 @@ impl FileTransferActivity { match self.browser.tab() { FileExplorerTab::Local => { self.action_go_to_local_upper_dir(); - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { let _ = self.update_remote_filelist(); } // Reload file list component @@ -179,7 +179,7 @@ impl FileTransferActivity { } FileExplorerTab::Remote => { self.action_go_to_remote_upper_dir(); - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { let _ = self.update_local_filelist(); } // Reload file list component @@ -192,7 +192,7 @@ impl FileTransferActivity { match self.browser.tab() { FileExplorerTab::Local => { self.action_go_to_previous_local_dir(); - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { let _ = self.update_remote_filelist(); } // Reload file list component @@ -200,7 +200,7 @@ impl FileTransferActivity { } FileExplorerTab::Remote => { self.action_go_to_previous_remote_dir(); - if self.browser.sync_browsing { + if self.browser.sync_browsing && self.browser.found().is_none() { let _ = self.update_local_filelist(); } // Reload file list component