diff --git a/Cargo.lock b/Cargo.lock index 5e54132..74c642e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4181,7 +4181,7 @@ dependencies = [ [[package]] name = "rotor" -version = "0.4.9" +version = "0.4.10" dependencies = [ "arboard", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 91efb57..87e5bde 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rotor" -version = "0.4.9" +version = "0.4.10" authors = ["Horbin"] edition = "2021" license = "MIT" diff --git a/src/module/screen_shotter.rs b/src/module/screen_shotter.rs index c583e22..02a0158 100644 --- a/src/module/screen_shotter.rs +++ b/src/module/screen_shotter.rs @@ -189,7 +189,6 @@ impl ScreenShotter{ } // event listen - // let pin_wins_clone = pin_wins.clone(); // TODO: clear pin_wins let pin_windows_clone = pin_windows.clone(); std::thread::spawn(move || { loop { @@ -199,9 +198,8 @@ impl ScreenShotter{ ScreenShotter::pin_win_move_hander(pin_windows.clone(), id); }, ShotterMessage::Close(id) => { - println!("close pin_win: {}", id); pin_windows_clone.lock().unwrap().remove(&id); - // pin_wins_clone.lock().unwrap().remove(&id); + // pin_wins_clone.lock().unwrap().remove(&id); // TODO: clear pin_wins } } } diff --git a/src/module/searcher.rs b/src/module/searcher.rs index a156af5..be05e01 100644 --- a/src/module/searcher.rs +++ b/src/module/searcher.rs @@ -32,7 +32,6 @@ impl Module for Searcher{ match msg_reciever.recv().unwrap() { ModuleMessage::Trigger => { search_win_clone.upgrade_in_event_loop(move |win| { - // TODO BUG1: a trick to make on_lose_focus_trick work on the first time win.show().unwrap(); win.window().with_winit_window(|winit_win: &i_slint_backend_winit::winit::window::Window| { winit_win.focus_window(); diff --git a/src/module/searcher/file_data.rs b/src/module/searcher/file_data.rs index 55390d3..647a63e 100644 --- a/src/module/searcher/file_data.rs +++ b/src/module/searcher/file_data.rs @@ -275,7 +275,7 @@ impl FileData { let return_result = if self.finding_result.items.len() > self.show_num { self.finding_result.items[..self.show_num].to_vec() } - else { self.finding_result.items.to_vec() }; // TODO 搜索不到更多文件了 + else { self.finding_result.items.to_vec() }; self.update_result_model(filename, return_result, increment_find); } break; diff --git a/src/module/searcher/volume.rs b/src/module/searcher/volume.rs index d70607f..26384cc 100644 --- a/src/module/searcher/volume.rs +++ b/src/module/searcher/volume.rs @@ -297,7 +297,7 @@ impl Volume { }); if let Some(sender) = sender { - let _ = sender.send(true); // TODO return false when failed + let _ = sender.send(true); } } @@ -342,8 +342,7 @@ impl Volume { let query_lower = query.to_lowercase(); let query_filter = Self::make_filter(&query_lower); - // clear channel before find !!! TODO need to use a better way - while self.stop_receiver.try_recv().is_ok() { } + while self.stop_receiver.try_recv().is_ok() { } // clear channel before find if self.last_query != query { self.last_search_num = 0;