Refactored create_flowbox_child constructor to use Podcast struct instead of raw strings/pixbuf.

This commit is contained in:
Jordan Petridis
2017-11-02 10:10:02 +02:00
parent 4da1ee8f10
commit 300fe86dc5
2 changed files with 9 additions and 7 deletions
+1 -4
View File
@@ -42,10 +42,7 @@ fn populate_flowbox(db: &Database, stack: &gtk::Stack, flowbox: &gtk::FlowBox) {
if let Ok(pds) = podcasts {
pds.iter().for_each(|parent| {
let title = parent.title();
let img = parent.image_uri();
let pixbuf = get_pixbuf_from_path(img, title);
let f = create_flowbox_child(title, pixbuf);
let f = create_flowbox_child(db, &parent);
f.connect_activate(clone!(db, stack, parent => move |_| {
on_flowbox_child_activate(&db, &stack, &parent);