InAppNotification: Remove the need to pass a sender.

This commit is contained in:
Jordan Petridis
2018-04-13 03:46:32 +03:00
parent 1f1d4af8ba
commit f94ccb9947
3 changed files with 11 additions and 14 deletions
+4 -3
View File
@@ -156,9 +156,10 @@ fn on_played_button_clicked(pd: Arc<Podcast>, episodes: &gtk::Frame, sender: Sen
pub fn mark_all_watched(pd: &Podcast, sender: Sender<Action>) -> Result<(), Error> {
dbqueries::update_none_to_played_now(pd)?;
sender.send(Action::RefreshWidgetIfVis)?;
sender.send(Action::RefreshEpisodesView)?;
Ok(())
// Not all widgets migth have been loaded when the mark_all is hit
// So we will need to refresh again after it's done.
sender.send(Action::RefreshWidgetIfSame(pd.id()))?;
sender.send(Action::RefreshEpisodesView).map_err(From::from)
}
// Ideally if we had a custom widget this would have been as simple as: