A "wait popup" will now be displayed while searching files

This commit is contained in:
veeso
2021-11-09 12:29:58 +01:00
committed by Christian Visintin
parent 02fdb27cc5
commit 88b29d3183
2 changed files with 8 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ Released on FIXME:
> ❄️ Winter update 2022 ⛄
- **Enhancements**:
- Find feature:
- A "wait popup" will now be displayed while searching files
## 0.7.0
Released on 12/10/2021

View File

@@ -433,12 +433,16 @@ impl Update for FileTransferActivity {
}
(COMPONENT_INPUT_FIND, Msg::OnSubmit(Payload::One(Value::Str(input)))) => {
self.umount_find_input();
// Mount wait
self.mount_blocking_wait(format!(r#"Searching for "{}"…"#, input).as_str());
// Find
let res: Result<Vec<FsEntry>, String> = match self.browser.tab() {
FileExplorerTab::Local => self.action_local_find(input.to_string()),
FileExplorerTab::Remote => self.action_remote_find(input.to_string()),
_ => panic!("Trying to search for files, while already in a find result"),
};
// Umount wait
self.umount_wait();
// Match result
match res {
Err(err) => {