Skip to content

Commit

Permalink
Move option to call site
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Jan 10, 2025
1 parent 628e08d commit 427c0ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/searchprovider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ async fn activate_result(
}
}

fn get_result_metas(app: &TurnOnApplication, call: &GetResultMetas) -> Option<Variant> {
fn get_result_metas(app: &TurnOnApplication, call: &GetResultMetas) -> Variant {
let metas: Vec<VariantDict> = call
.identifiers
.iter()
Expand All @@ -139,7 +139,7 @@ fn get_result_metas(app: &TurnOnApplication, call: &GetResultMetas) -> Option<Va
})
})
.collect::<Vec<_>>();
Some((metas,).into())
(metas,).into()
}

async fn dispatch_method_call(
Expand All @@ -161,7 +161,7 @@ async fn dispatch_method_call(
// We just search fresh again, since our model is neither that big nor that complicated
Ok(Some(get_result_set(&app, c.terms.as_slice())))
}
GetResultMetas(c) => Ok(get_result_metas(&app, &c)),
GetResultMetas(c) => Ok(Some(get_result_metas(&app, &c))),
ActivateResult(c) => activate_result(&app, c).await,
LaunchSearch(c) => {
glib::debug!("Launching search for terms {:?}", &c.terms);
Expand Down

0 comments on commit 427c0ae

Please sign in to comment.