diff --git a/hammond-gtk/resources/gtk/show_widget.ui b/hammond-gtk/resources/gtk/show_widget.ui
index 1bc45e7..cb3aa36 100644
--- a/hammond-gtk/resources/gtk/show_widget.ui
+++ b/hammond-gtk/resources/gtk/show_widget.ui
@@ -151,6 +151,7 @@
True
center
center
+ app.update
diff --git a/hammond-gtk/src/content.rs b/hammond-gtk/src/content.rs
index 73e2234..6293d59 100644
--- a/hammond-gtk/src/content.rs
+++ b/hammond-gtk/src/content.rs
@@ -124,12 +124,7 @@ impl ShowStack {
pub fn replace_widget(&self, pd: &Podcast) {
let old = self.stack.get_child_by_name("widget").unwrap();
- let new = ShowWidget::new(
- Rc::new(self.clone()),
- self.epstack.clone(),
- self.header.clone(),
- pd,
- );
+ let new = ShowWidget::new(Rc::new(self.clone()), self.header.clone(), pd);
self.stack.remove(&old);
self.stack.add_named(&new.container, "widget");
diff --git a/hammond-gtk/src/widgets/show.rs b/hammond-gtk/src/widgets/show.rs
index 66da950..0da781f 100644
--- a/hammond-gtk/src/widgets/show.rs
+++ b/hammond-gtk/src/widgets/show.rs
@@ -11,7 +11,7 @@ use hammond_downloader::downloader;
use widgets::episode::episodes_listbox;
use utils::get_pixbuf_from_path;
-use content::{EpisodeStack, ShowStack};
+use content::ShowStack;
use headerbar::Header;
use std::rc::Rc;
@@ -53,30 +53,17 @@ impl Default for ShowWidget {
}
impl ShowWidget {
- pub fn new(
- shows: Rc,
- epstack: Rc,
- header: Rc,
- pd: &Podcast,
- ) -> ShowWidget {
+ pub fn new(shows: Rc, header: Rc, pd: &Podcast) -> ShowWidget {
let pdw = ShowWidget::default();
- pdw.init(shows, epstack, header, pd);
+ pdw.init(shows, header, pd);
pdw
}
- pub fn init(
- &self,
- shows: Rc,
- epstack: Rc,
- header: Rc,
- pd: &Podcast,
- ) {
+ pub fn init(&self, shows: Rc, header: Rc, pd: &Podcast) {
WidgetExt::set_name(&self.container, &pd.id().to_string());
- // TODO: should spawn a thread to avoid locking the UI probably.
- self.unsub
- .connect_clicked(clone!(shows, epstack, pd => move |bttn| {
- on_unsub_button_clicked(shows.clone(), epstack.clone(), &pd, bttn);
+ self.unsub.connect_clicked(clone!(shows, pd => move |bttn| {
+ on_unsub_button_clicked(shows.clone(), &pd, bttn);
header.switch_to_normal();
}));
@@ -106,12 +93,7 @@ impl ShowWidget {
}
}
-fn on_unsub_button_clicked(
- shows: Rc,
- epstack: Rc,
- pd: &Podcast,
- unsub_button: >k::Button,
-) {
+fn on_unsub_button_clicked(shows: Rc, pd: &Podcast, unsub_button: >k::Button) {
let res = dbqueries::remove_feed(pd);
if res.is_ok() {
info!("{} was removed succesfully.", pd.title());
@@ -128,8 +110,6 @@ fn on_unsub_button_clicked(
};
}
shows.switch_podcasts_animated();
- shows.update_podcasts();
- epstack.update();
}
#[allow(dead_code)]