mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
show bookmarked suggestions first
This commit is contained in:
parent
6f82924b4f
commit
d6018dc66a
1 changed files with 28 additions and 24 deletions
|
|
@ -170,7 +170,8 @@ impl Suggestion {
|
|||
let list_store = self.list_store.clone();
|
||||
let profile = self.profile.clone();
|
||||
gtk::glib::spawn_future_local(async move {
|
||||
let list_items = gtk::gio::spawn_blocking(move || {
|
||||
let list_items: Vec<(GString, GString, bool, GString)> =
|
||||
gtk::gio::spawn_blocking(move || {
|
||||
let result = profile
|
||||
.history
|
||||
.contains_request(&query, limit)
|
||||
|
|
@ -191,6 +192,9 @@ impl Suggestion {
|
|||
))
|
||||
}
|
||||
list_items
|
||||
.into_iter()
|
||||
.sorted_by(|a, b| Ord::cmp(&b.2, &a.2)) // bookmark first
|
||||
.collect()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue