Commit 15813c5c 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)

Manual forward-port of 684dd29a
parent 3f698056
......@@ -333,11 +333,12 @@
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;
}
}
- (void)showMetadata:(BOOL)showMeta
......
......@@ -319,11 +319,12 @@
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;
}
}
- (void)longTouchGestureAction:(UIGestureRecognizer *)recognizer
......
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