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
7da67c5d
Commit
7da67c5d
authored
1 year ago
by
Nicolas Pomepuy
Committed by
Duncan McNamara
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix the mini visualizer leaking the HeaderMediaListActivity
parent
95d137cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1857
Fix mini visualizer state in HeaderMediaListActivity
Pipeline
#438129
passed with stage
in 8 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt
+18
-9
18 additions, 9 deletions
...droid/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt
with
18 additions
and
9 deletions
application/vlc-android/src/org/videolan/vlc/gui/HeaderMediaListActivity.kt
+
18
−
9
View file @
7da67c5d
...
...
@@ -167,15 +167,6 @@ open class HeaderMediaListActivity : AudioPlayerContainerActivity(), IEventsHand
binding
.
songs
.
addItemDecoration
(
RecyclerSectionItemDecoration
(
resources
.
getDimensionPixelSize
(
R
.
dimen
.
recycler_section_header_height
),
true
,
viewModel
.
tracksProvider
))
}
val
playlistModel
=
PlaylistModel
.
get
(
this
)
PlaylistManager
.
currentPlayedMedia
.
observe
(
this
)
{
audioBrowserAdapter
.
currentMedia
=
it
}
playlistModel
.
dataset
.
asFlow
().
conflate
().
onEach
{
audioBrowserAdapter
.
setCurrentlyPlaying
(
playlistModel
.
playing
)
delay
(
50L
)
}.
launchWhenStarted
(
lifecycleScope
)
audioBrowserAdapter
.
setModel
(
playlistModel
)
binding
.
btnShuffle
.
setOnClickListener
{
viewModel
.
playlist
?.
let
{
MediaUtils
.
playTracks
(
this
,
it
,
SecureRandom
().
nextInt
(
min
(
playlist
.
tracksCount
,
MEDIALIBRARY_PAGE_SIZE
)),
true
)
}
}
...
...
@@ -239,6 +230,24 @@ open class HeaderMediaListActivity : AudioPlayerContainerActivity(), IEventsHand
binding
.
browserFastScroller
.
setRecyclerView
(
binding
.
songs
,
viewModel
.
tracksProvider
)
}
override
fun
onResume
()
{
super
.
onResume
()
val
playlistModel
=
PlaylistModel
.
get
(
this
)
PlaylistManager
.
currentPlayedMedia
.
observe
(
this
)
{
audioBrowserAdapter
.
currentMedia
=
it
}
playlistModel
.
dataset
.
asFlow
().
conflate
().
onEach
{
audioBrowserAdapter
.
setCurrentlyPlaying
(
playlistModel
.
playing
)
delay
(
50L
)
}.
launchWhenStarted
(
lifecycleScope
)
audioBrowserAdapter
.
setModel
(
playlistModel
)
}
override
fun
onPause
()
{
super
.
onPause
()
audioBrowserAdapter
.
setCurrentlyPlaying
(
false
)
}
override
fun
onStop
()
{
super
.
onStop
()
stopActionMode
()
...
...
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