GIFNVLRQXQV3H7FHJLLBTNC3YSDCIZWEGFNDASF4E34O3ID4AA7QC
pub mod controllers;
// query
_ if cmd.is(command::QUERY_RUN) => {
match data.query.parse::<tf_db::Filter>() {
Ok(filter) => match data.db.write().list_filtered(&filter) {
Ok(songs) => {
data.songs = songs
.iter()
.map(|s| SongListItem {
song: Rc::new(s.clone()),
selected: false,
})
.collect();
}
Err(e) => println!("error while querying {:?}", e),
},
Err(e) => println!("invalid query {e:?}"),
}
druid::Handled::Yes
}