Reload directory content with '<L>'

This commit is contained in:
ChristianVisintin
2020-12-14 13:52:49 +01:00
parent bd99a0c2b2
commit b8b29371ca
4 changed files with 50 additions and 34 deletions

View File

@@ -219,6 +219,11 @@ impl FileTransferActivity {
// Show file info
self.input_mode = InputMode::Popup(PopupType::FileInfo);
}
'l' | 'L' => {
// Reload file entries
let pwd: PathBuf = self.context.as_ref().unwrap().local.pwd();
self.local_scan(pwd.as_path());
}
'r' | 'R' => {
// Rename
self.input_mode = InputMode::Popup(PopupType::Input(
@@ -368,10 +373,6 @@ impl FileTransferActivity {
}
}
KeyCode::Char(ch) => match ch {
'q' | 'Q' => {
// Create quit prompt dialog
self.input_mode = self.create_quit_popup();
}
'e' | 'E' => {
// Get file at index
if let Some(entry) = self.remote.files.get(self.remote.index) {
@@ -388,6 +389,13 @@ impl FileTransferActivity {
))
}
}
'd' | 'D' => {
// Make directory
self.input_mode = InputMode::Popup(PopupType::Input(
String::from("Insert directory name"),
FileTransferActivity::callback_mkdir,
));
}
'g' | 'G' => {
// Goto
// Show input popup
@@ -396,13 +404,6 @@ impl FileTransferActivity {
FileTransferActivity::callback_change_directory,
));
}
'd' | 'D' => {
// Make directory
self.input_mode = InputMode::Popup(PopupType::Input(
String::from("Insert directory name"),
FileTransferActivity::callback_mkdir,
));
}
'h' | 'H' => {
// Show help
self.input_mode = InputMode::Popup(PopupType::Help);
@@ -411,6 +412,14 @@ impl FileTransferActivity {
// Show file info
self.input_mode = InputMode::Popup(PopupType::FileInfo);
}
'l' | 'L' => {
// Reload file entries
self.reload_remote_dir();
}
'q' | 'Q' => {
// Create quit prompt dialog
self.input_mode = self.create_quit_popup();
}
'r' | 'R' => {
// Rename
self.input_mode = InputMode::Popup(PopupType::Input(