Commit 5689e011 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

library: don't display remaining time if it's less than a minute

parent 12eaf32d
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
if (SYSTEM_RUNS_IOS7_OR_LATER) { if (SYSTEM_RUNS_IOS7_OR_LATER) {
CGFloat duration = mediaItem.duration.floatValue; CGFloat duration = mediaItem.duration.floatValue;
if (position > .1f && position < .95f) { if (position > .1f && position < .95f && (duration * position - duration) > 0) {
[(UITextView*)self.mediaIsUnreadView setText:[NSString stringWithFormat:NSLocalizedString(@"LIBRARY_MINUTES_LEFT", @""), [[VLCTime timeWithInt:(duration * position - duration)] minuteStringValue]]]; [(UITextView*)self.mediaIsUnreadView setText:[NSString stringWithFormat:NSLocalizedString(@"LIBRARY_MINUTES_LEFT", @""), [[VLCTime timeWithInt:(duration * position - duration)] minuteStringValue]]];
self.mediaIsUnreadView.hidden = NO; self.mediaIsUnreadView.hidden = NO;
} else if (mediaItem.unread.intValue) { } else if (mediaItem.unread.intValue) {
......
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
if (SYSTEM_RUNS_IOS7_OR_LATER) { if (SYSTEM_RUNS_IOS7_OR_LATER) {
CGFloat duration = mediaItem.duration.floatValue; CGFloat duration = mediaItem.duration.floatValue;
if (position > .1f && position < .95f) { if (position > .1f && position < .95f && (duration * position - duration) > 0) {
[(UITextView*)self.mediaIsUnreadView setText:[NSString stringWithFormat:NSLocalizedString(@"LIBRARY_MINUTES_LEFT", @""), [[VLCTime timeWithInt:(duration * position - duration)] minuteStringValue]]]; [(UITextView*)self.mediaIsUnreadView setText:[NSString stringWithFormat:NSLocalizedString(@"LIBRARY_MINUTES_LEFT", @""), [[VLCTime timeWithInt:(duration * position - duration)] minuteStringValue]]];
self.mediaIsUnreadView.hidden = NO; self.mediaIsUnreadView.hidden = NO;
} else if (mediaItem.unread.intValue) { } else if (mediaItem.unread.intValue) {
......
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