Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
531
Issue boards
Milestones
Wiki
Code
Merge requests
12
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
be11f61f
Commit
be11f61f
authored
5 years ago
by
Nicolas Pomepuy
Committed by
Geoffrey Métais
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix fast scroller provider in audio lists
(cherry picked from commit
fa0bb067
)
parent
39c373f4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.kt
+3
-3
3 additions, 3 deletions
...id/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.kt
vlc-android/src/org/videolan/vlc/gui/view/FastScroller.kt
+3
-1
3 additions, 1 deletion
vlc-android/src/org/videolan/vlc/gui/view/FastScroller.kt
with
6 additions
and
4 deletions
vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.kt
+
3
−
3
View file @
be11f61f
...
...
@@ -287,7 +287,7 @@ class AudioBrowserFragment : BaseAudioBrowser<AudioBrowserViewModel>(), SwipeRef
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
)
{
super
.
onTabSelected
(
tab
)
fastScroller
.
setRecyclerView
(
lists
[
tab
.
position
]
!!
,
viewModel
.
providers
[
currentTab
])
fastScroller
.
setRecyclerView
(
lists
[
tab
.
position
],
viewModel
.
providers
[
tab
.
position
])
settings
.
edit
().
putInt
(
KEY_AUDIO_CURRENT_TAB
,
tab
.
position
).
apply
()
if
(
viewModel
.
providers
[
currentTab
].
isRefreshing
)
handler
.
sendEmptyMessage
(
SET_REFRESHING
)
...
...
@@ -298,12 +298,12 @@ class AudioBrowserFragment : BaseAudioBrowser<AudioBrowserViewModel>(), SwipeRef
override
fun
onTabUnselected
(
tab
:
TabLayout
.
Tab
)
{
super
.
onTabUnselected
(
tab
)
onDestroyActionMode
(
lists
[
tab
.
position
]
!!
.
adapter
as
AudioBrowserAdapter
?)
onDestroyActionMode
(
lists
[
tab
.
position
].
adapter
as
AudioBrowserAdapter
?)
viewModel
.
restore
()
}
override
fun
onTabReselected
(
tab
:
TabLayout
.
Tab
)
{
lists
[
tab
.
position
]
?
.
smoothScrollToPosition
(
0
)
lists
[
tab
.
position
].
smoothScrollToPosition
(
0
)
}
override
fun
onCtxAction
(
position
:
Int
,
option
:
Int
)
{
...
...
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/gui/view/FastScroller.kt
+
3
−
1
View file @
be11f61f
...
...
@@ -55,6 +55,8 @@ import org.videolan.vlc.providers.HeadersIndex
import
org.videolan.vlc.providers.medialibrary.MedialibraryProvider
import
org.videolan.vlc.util.WeakHandler
import
java.util.concurrent.atomic.AtomicBoolean
import
kotlin.math.max
import
kotlin.math.min
private
const
val
TAG
=
"FastScroller"
private
const
val
HANDLE_ANIMATION_DURATION
=
100
...
...
@@ -313,7 +315,7 @@ class FastScroller : LinearLayout, CoroutineScope, Observer<HeadersIndex> {
}
private
fun
getValueInRange
(
min
:
Int
,
max
:
Int
,
value
:
Int
):
Int
{
return
Math
.
min
(
Math
.
max
(
min
,
value
),
max
)
return
min
(
max
(
min
,
value
),
max
)
}
...
...
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