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
53bd1853
Commit
53bd1853
authored
2 years ago
by
Nicolas Pomepuy
Browse files
Options
Downloads
Patches
Plain Diff
Fix initial sort on files
parent
b33f7749
No related branches found
No related tags found
1 merge request
!1560
Fix initial sort on files
Pipeline
#267564
passed with stage
in 3 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
+4
-4
4 additions, 4 deletions
...android/src/org/videolan/vlc/providers/BrowserProvider.kt
with
4 additions
and
4 deletions
application/vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
+
4
−
4
View file @
53bd1853
...
...
@@ -83,8 +83,8 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
else
->
true
}
fun
getComparator
(
nbOfDigits
:
Int
):
Comparator
<
MediaLibraryItem
>?
=
when
{
Settings
.
showTvUi
&&
sort
==
Medialibrary
.
SORT_ALPHA
&&
desc
->
tvDescComp
Settings
.
showTvUi
&&
sort
==
Medialibrary
.
SORT_ALPHA
&&
!
desc
->
tvAscComp
Settings
.
showTvUi
&&
sort
in
arrayOf
(
Medialibrary
.
SORT_ALPHA
,
Medialibrary
.
SORT_DEFAULT
)
&&
desc
->
tvDescComp
Settings
.
showTvUi
&&
sort
in
arrayOf
(
Medialibrary
.
SORT_ALPHA
,
Medialibrary
.
SORT_DEFAULT
)
&&
!
desc
->
tvAscComp
url
!=
null
&&
Uri
.
parse
(
url
)
?.
scheme
==
"upnp"
->
null
sort
==
Medialibrary
.
SORT_ALPHA
&&
desc
->
descComp
sort
==
Medialibrary
.
SORT_ALPHA
&&
!
desc
->
ascComp
...
...
@@ -322,8 +322,8 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
descriptionUpdate
.
value
=
Pair
(
position
,
it
)
}
directories
.
addAll
(
files
)
sort
(
directories
.
to
MutableList
()
)
withContext
(
coroutineContextProvider
.
Main
)
{
foldersContentMap
.
put
(
item
,
directories
.
toMutableList
()
)
}
sort
(
directories
as
MutableList
<
MediaLibraryItem
>
)
withContext
(
coroutineContextProvider
.
Main
)
{
foldersContentMap
.
put
(
item
,
directories
)
}
}
directories
.
clear
()
files
.
clear
()
...
...
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