Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
533
Issue boards
Milestones
Wiki
Code
Merge requests
11
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
75880b05
Commit
75880b05
authored
1 year ago
by
Robert Stone
Browse files
Options
Downloads
Patches
Plain Diff
Fix NPE if playlist is null
parent
0fa806f8
No related branches found
No related tags found
1 merge request
!1739
Assorted small bugfixes and enhancements
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt
+3
-8
3 additions, 8 deletions
...droid/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt
with
3 additions
and
8 deletions
application/vlc-android/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt
+
3
−
8
View file @
75880b05
...
...
@@ -129,16 +129,11 @@ open class HeaderMediaListActivity : AudioPlayerContainerActivity(), IEventsHand
viewModel
.
playlistLiveData
.
observe
(
this
)
{
playlist
->
binding
.
btnFavorite
.
setImageDrawable
(
ContextCompat
.
getDrawable
(
this
,
if
(
playlist
.
isFavorite
)
R
.
drawable
.
ic_header_media_favorite
else
R
.
drawable
.
ic_header_media_favorite_outline
ContextCompat
.
getDrawable
(
this
,
if
(
playlist
?.
isFavorite
==
true
)
R
.
drawable
.
ic_header_media_favorite
else
R
.
drawable
.
ic_header_media_favorite_outline
)
)
var
totalDuration
=
0L
for
(
item
in
playlist
.
tracks
)
totalDuration
+=
item
.
length
binding
.
totalDuration
=
totalDuration
binding
.
totalDuration
=
playlist
?.
tracks
?.
sumOf
{
it
.
length
}
?:
0
if
(
playlist
is
Album
)
{
val
releaseYear
=
playlist
.
releaseYear
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment