Added resetting state of the recyclerview scroll listener

In some edge-cases the listener can still think that the content is loading.
This commit is contained in:
Viktor De Pasquale
2020-01-06 18:20:01 +01:00
parent ed837ba26f
commit 7342509b2e
4 changed files with 17 additions and 2 deletions
@@ -4,6 +4,7 @@ import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.StaggeredGridLayoutManager
import com.topjohnwu.magisk.model.events.ViewEvent
class EndlessRecyclerScrollListener(
private val layoutManager: RecyclerView.LayoutManager,
@@ -110,4 +111,6 @@ class EndlessRecyclerScrollListener(
previousTotalItemCount = 0
loading = true
}
class ResetState : ViewEvent()
}