Commit 5fed283f authored by Jordan Petridis's avatar Jordan Petridis 🌱

EpisodeWidget: Hide duration label if its equal to 0.

parent bb5c25d8
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment