Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
15813c5c
Commit
15813c5c
authored
Sep 08, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
library: fix logic to determine reliabily if a media object is 'new' (close #14881)
Manual forward-port of
684dd29a
parent
3f698056
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
Sources/VLCPlaylistCollectionViewCell.m
Sources/VLCPlaylistCollectionViewCell.m
+4
-3
Sources/VLCPlaylistTableViewCell.m
Sources/VLCPlaylistTableViewCell.m
+4
-3
No files found.
Sources/VLCPlaylistCollectionViewCell.m
View file @
15813c5c
...
...
@@ -333,11 +333,12 @@
if
(
position
>
.
05
f
&&
position
<
.
95
f
&&
(
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
...
...
Sources/VLCPlaylistTableViewCell.m
View file @
15813c5c
...
...
@@ -319,11 +319,12 @@
if
(
position
>
.
05
f
&&
position
<
.
95
f
&&
(
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment