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
14
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
79b21d9e
Commit
79b21d9e
authored
5 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Browser: post loading values in main thread
parent
e56cd4fc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#7711
passed with stage
in 3 minutes and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
+5
-5
5 additions, 5 deletions
...android/src/org/videolan/vlc/providers/BrowserProvider.kt
vlc-android/src/org/videolan/vlc/providers/StorageProvider.kt
+1
-1
1 addition, 1 deletion
...android/src/org/videolan/vlc/providers/StorageProvider.kt
with
6 additions
and
6 deletions
vlc-android/src/org/videolan/vlc/providers/BrowserProvider.kt
+
5
−
5
View file @
79b21d9e
...
...
@@ -97,7 +97,7 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
}
protected
open
fun
browse
(
url
:
String
?
=
null
)
{
loading
.
v
alue
=
true
loading
.
postV
alue
(
true
)
browserActor
.
post
(
Browse
(
url
))
}
...
...
@@ -107,14 +107,14 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
for
(
media
in
browserChannel
)
findMedia
(
media
)
?.
let
{
addMedia
(
it
)
}
if
(
dataset
.
value
.
isNotEmpty
())
parseSubDirectories
()
else
dataset
.
clear
()
// send observable event when folder is empty
loading
.
v
alue
=
false
loading
.
postV
alue
(
false
)
}
protected
open
fun
addMedia
(
media
:
MediaLibraryItem
)
=
dataset
.
add
(
media
)
open
fun
refresh
()
{
if
(
url
===
null
)
return
loading
.
v
alue
=
true
loading
.
postV
alue
(
true
)
browserActor
.
post
(
Refresh
)
}
...
...
@@ -145,7 +145,7 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
computeHeaders
(
value
)
dataset
.
value
=
value
parseSubDirectories
()
loading
.
v
alue
=
false
loading
.
postV
alue
(
false
)
}
private
suspend
fun
parseSubDirectoriesImpl
()
{
...
...
@@ -265,7 +265,7 @@ abstract class BrowserProvider(val context: Context, val dataset: LiveDataset<Me
open
fun
release
()
{
browserActor
.
post
(
Release
)
cancel
()
loading
.
v
alue
=
false
loading
.
postV
alue
(
false
)
}
protected
fun
getList
(
url
:
String
)
=
prefetchLists
[
url
]
...
...
This diff is collapsed.
Click to expand it.
vlc-android/src/org/videolan/vlc/providers/StorageProvider.kt
+
1
−
1
View file @
79b21d9e
...
...
@@ -77,7 +77,7 @@ class StorageProvider(context: Context, dataset: LiveDataset<MediaLibraryItem>,
val
value
:
MutableList
<
MediaLibraryItem
>
=
browserChannel
.
filter
{
it
.
isStorage
()
}.
mapTo
(
mutableListOf
())
{
Storage
(
it
.
uri
)}
dataset
.
value
=
value
parseSubDirectories
()
loading
.
v
alue
=
false
loading
.
postV
alue
(
false
)
}
}
...
...
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