Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pomepuy
VLC-Android
Commits
4fba3dc7
Commit
4fba3dc7
authored
2 years ago
by
Nicolas Pomepuy
Browse files
Options
Downloads
Patches
Plain Diff
Add logs to debug the refresh threshold
parent
0d93c33a
Branches
2.2.x
No related tags found
No related merge requests found
Pipeline
#383652
passed with stage
in 22 minutes and 48 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt
+3
-0
3 additions, 0 deletions
...tion/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt
with
3 additions
and
0 deletions
application/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt
+
3
−
0
View file @
4fba3dc7
...
...
@@ -4,6 +4,7 @@ import android.content.Intent
import
android.content.res.TypedArray
import
android.graphics.Color
import
android.os.Bundle
import
android.util.Log
import
android.util.TypedValue
import
android.view.Menu
import
android.view.View
...
...
@@ -122,7 +123,9 @@ abstract class BaseFragment : Fragment(), ActionMode.Callback {
protected
fun
setRefreshing
(
refreshing
:
Boolean
,
action
:
((
loading
:
Boolean
)
->
Unit
)?
=
null
)
{
refreshJob
=
lifecycleScope
.
launchWhenStarted
{
Log
.
i
(
this
::
class
.
java
.
simpleName
,
"Refreshing launched (before 300ms check): $refreshing"
)
if
(
refreshing
)
delay
(
300L
)
Log
.
i
(
this
::
class
.
java
.
simpleName
,
"Refreshing launched (after 300ms check): $refreshing"
)
swipeRefreshLayout
.
isRefreshing
=
refreshing
(
activity
as
?
MainActivity
)
?.
refreshing
=
refreshing
action
?.
invoke
(
refreshing
)
...
...
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