EpisodeWidget: Hide duration label if its equal to 0.
This commit is contained in:
parent
bb5c25d87f
commit
5fed283ff4
@ -160,6 +160,10 @@ impl EpisodeWidget {
|
|||||||
|
|
||||||
/// Set the duration label.
|
/// Set the duration label.
|
||||||
fn set_duration(&self, seconds: Option<i32>) {
|
fn set_duration(&self, seconds: Option<i32>) {
|
||||||
|
if (seconds == Some(0)) || seconds.is_none() {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
if let Some(secs) = seconds {
|
if let Some(secs) = seconds {
|
||||||
self.duration.set_text(&format!("{} min", secs / 60));
|
self.duration.set_text(&format!("{} min", secs / 60));
|
||||||
self.duration.show();
|
self.duration.show();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user