فهرست منبع

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

Felix Paul Kühne 11 سال پیش
والد
کامیت
5689e011bf
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      Sources/VLCPlaylistCollectionViewCell.m
  2. 1 1
      Sources/VLCPlaylistTableViewCell.m

+ 1 - 1
Sources/VLCPlaylistCollectionViewCell.m

@@ -231,7 +231,7 @@
 
     if (SYSTEM_RUNS_IOS7_OR_LATER) {
         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]]];
             self.mediaIsUnreadView.hidden = NO;
         } else if (mediaItem.unread.intValue) {

+ 1 - 1
Sources/VLCPlaylistTableViewCell.m

@@ -223,7 +223,7 @@
 
     if (SYSTEM_RUNS_IOS7_OR_LATER) {
         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]]];
             self.mediaIsUnreadView.hidden = NO;
         } else if (mediaItem.unread.intValue) {