fix search

This commit is contained in:
leca 2024-05-03 01:32:05 +03:00
parent 8d4b92e247
commit 2398b3cfab
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,6 @@ impl MemoryCardsEditScene {
let mut stmt = conn.prepare(sql.as_str()).unwrap(); let mut stmt = conn.prepare(sql.as_str()).unwrap();
// let mut stmt = stmt.lock().unwrap();
let cards_iter = stmt let cards_iter = stmt
.query_map([], |row| { .query_map([], |row| {
let image_path: String = match row.get(0) { let image_path: String = match row.get(0) {
@ -250,6 +249,7 @@ impl MemoryCardsEditScene {
Ok(entry) Ok(entry)
}) })
.unwrap(); .unwrap();
self.displaying_cards.lock().unwrap().borrow_mut().clear();
for c in cards_iter { for c in cards_iter {
self.displaying_cards.lock().unwrap().borrow_mut().push(c.unwrap()); self.displaying_cards.lock().unwrap().borrow_mut().push(c.unwrap());
} }