add placeholder for refreshing model from cache4
This commit is contained in:
parent
d7c48e69f5
commit
b3ce9ada8c
1 changed files with 5 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ static X11_CONN: OnceCell<RustConnection> = OnceCell::new();
|
||||||
|
|
||||||
pub enum Event {
|
pub enum Event {
|
||||||
Response(pop_launcher::Response),
|
Response(pop_launcher::Response),
|
||||||
|
RefreshFromCache,
|
||||||
Search(String),
|
Search(String),
|
||||||
Activate(u32),
|
Activate(u32),
|
||||||
}
|
}
|
||||||
|
|
@ -126,6 +127,9 @@ fn main() {
|
||||||
Event::Activate(index) => {
|
Event::Activate(index) => {
|
||||||
let _ = launcher.send(pop_launcher::Request::Activate(index)).await;
|
let _ = launcher.send(pop_launcher::Request::Activate(index)).await;
|
||||||
}
|
}
|
||||||
|
Event::RefreshFromCache => {
|
||||||
|
//TODO refresh the model from cached_results (required after DnD for example)
|
||||||
|
}
|
||||||
Event::Response(event) => {
|
Event::Response(event) => {
|
||||||
if let pop_launcher::Response::Update(mut results) = event {
|
if let pop_launcher::Response::Update(mut results) = event {
|
||||||
// sort to make comparison with cache easier
|
// sort to make comparison with cache easier
|
||||||
|
|
@ -151,6 +155,7 @@ fn main() {
|
||||||
acc
|
acc
|
||||||
});
|
});
|
||||||
let mut stack_active: Vec<BoxedSearchResults> = stack_active.into_values().collect();
|
let mut stack_active: Vec<BoxedSearchResults> = stack_active.into_values().collect();
|
||||||
|
|
||||||
// update active app stacks for saved apps into the saved app model
|
// update active app stacks for saved apps into the saved app model
|
||||||
// then put the rest in the active app model (which doesn't include saved apps)
|
// then put the rest in the active app model (which doesn't include saved apps)
|
||||||
let saved_app_model = window.saved_app_model();
|
let saved_app_model = window.saved_app_model();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue