Commit 5d286f98 authored by Felix Paul Kühne's avatar Felix Paul Kühne

iOS 7 library: drop the progress indicator and put the remaining time as text with the same rules

parent 57b57d9e
......@@ -29,13 +29,6 @@
return cell;
}
- (void)awakeFromNib
{
if (SYSTEM_RUNS_IN_THE_FUTURE) {
[(UILabel *)self.mediaIsUnreadView setText:[NSLocalizedString(@"NEW", @"") capitalizedStringWithLocale:[NSLocale currentLocale]]];
}
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
[self _updatedDisplayedInformationForKeyPath:keyPath];
......@@ -241,10 +234,22 @@
}
CGFloat position = mediaFile.lastPosition.floatValue;
self.progressIndicator.progress = position;
self.progressIndicator.hidden = ((position < .1f) || (position > .95f)) ? YES : NO;
[self.progressIndicator setNeedsDisplay];
self.mediaIsUnreadView.hidden = !mediaFile.unread.intValue;
if (SYSTEM_RUNS_IN_THE_FUTURE) {
if (position > .1f && position < .95f) {
[(UITextView*)self.mediaIsUnreadView setText:[NSString stringWithFormat:NSLocalizedString(@"LIBRARY_MINUTES_LEFT", @""), [[VLCTime timeWithInt:(mediaFile.duration.floatValue * position)] minuteStringValue]]];
self.mediaIsUnreadView.hidden = NO;
} else if (mediaFile.unread.intValue) {
[(UILabel *)self.mediaIsUnreadView setText:[NSLocalizedString(@"NEW", @"") 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 = !mediaFile.unread.intValue;
}
}
@end
......@@ -31,7 +31,7 @@
<size key="shadowOffset" width="0.0" height="0.0"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="New" textAlignment="right" lineBreakMode="wordWrap" baselineAdjustment="none" minimumFontSize="9" adjustsLetterSpacingToFitWidth="YES" id="sYw-l2-Tmv">
<rect key="frame" x="265" y="61" width="50" height="26"/>
<rect key="frame" x="222" y="61" width="93" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
......
B"CHOOSE_AUDIO_TRACK"="Audiospur wählen";
......
B"CHOOSE_AUDIO_TRACK"="Choose Audio Track";
......
B"CHOOSE_AUDIO_TRACK"="Choisir la piste audio";
......
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