EpisodeWidget: Hide duration label if its equal to 0.

This commit is contained in:
Jordan Petridis
2018-01-06 03:18:28 +02:00
parent bb5c25d87f
commit 5fed283ff4
+4
View File
@@ -160,6 +160,10 @@ impl EpisodeWidget {
/// Set the duration label.
fn set_duration(&self, seconds: Option<i32>) {
if (seconds == Some(0)) || seconds.is_none() {
return;
};
if let Some(secs) = seconds {
self.duration.set_text(&format!("{} min", secs / 60));
self.duration.show();