Skip to content
Snippets Groups Projects
Commit 4fba3dc7 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

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
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment