Commit 684dd29a authored by Felix Paul Kühne's avatar Felix Paul Kühne

library: fix logic to determine reliabily if a media object is 'new' (close #14881)

parent 7b2c5fd6
2.6.5:
------
* Fixed playback of streams opened through the legacy vlc:// pseudo protocol
* Minor improvements (#14836, #14881, #15118)
2.6.4:
------
......
......@@ -339,16 +339,17 @@
if (position > .05f && position < .95f && (duration * position - duration) < -60000) {
[(UITextView*)self.mediaIsUnreadView setText:[NSString stringWithFormat:NSLocalizedString(@"LIBRARY_MINUTES_LEFT", nil), [[VLCTime timeWithInt:(duration * position - duration)] minuteStringValue]]];
self.mediaIsUnreadView.hidden = NO;
} else if (mediaLibraryFile.unread.intValue) {
} else if (position != 0.) {
self.mediaIsUnreadView.hidden = YES;
} else {
[(UILabel *)self.mediaIsUnreadView setText:[NSLocalizedString(@"NEW", nil) capitalizedStringWithLocale:[NSLocale currentLocale]]];
self.mediaIsUnreadView.hidden = NO;
} else
self.mediaIsUnreadView.hidden = YES;
}
} else {
self.progressView.progress = position;
self.progressView.hidden = ((position < .1f) || (position > .95f)) ? YES : NO;
[self.progressView setNeedsDisplay];
self.mediaIsUnreadView.hidden = !mediaLibraryFile.unread.intValue;
self.mediaIsUnreadView.hidden = position != 0.;
}
}
......
......@@ -329,16 +329,17 @@
if (position > .05f && position < .95f && (duration * position - duration) < -60000) {
[(UITextView*)self.mediaIsUnreadView setText:[NSString stringWithFormat:NSLocalizedString(@"LIBRARY_MINUTES_LEFT", nil), [[VLCTime timeWithInt:(duration * position - duration)] minuteStringValue]]];
self.mediaIsUnreadView.hidden = NO;
} else if (mediaLibraryFile.unread.intValue) {
} else if (position != 0.) {
self.mediaIsUnreadView.hidden = YES;
} else {
[(UILabel *)self.mediaIsUnreadView setText:[NSLocalizedString(@"NEW", nil) capitalizedStringWithLocale:[NSLocale currentLocale]]];
self.mediaIsUnreadView.hidden = NO;
} else
self.mediaIsUnreadView.hidden = YES;
}
} else {
self.progressIndicator.progress = position;
self.progressIndicator.hidden = ((position < .1f) || (position > .95f)) ? YES : NO;
[self.progressIndicator setNeedsDisplay];
self.mediaIsUnreadView.hidden = !mediaLibraryFile.unread.intValue || self.progressIndicator.hidden;
self.mediaIsUnreadView.hidden = position != 0. || self.progressIndicator.hidden;
}
}
......
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