Try to fix crash bug

This commit is contained in:
Phillip Thelen 2019-09-18 10:57:44 +02:00
parent 3e8f7b5944
commit 0d93fb4b0f
2 changed files with 5 additions and 4 deletions

View file

@ -230,6 +230,7 @@ open class TaskRecyclerViewFragment : BaseFragment(), androidx.swiperefreshlayou
recyclerAdapter?.filter()
layoutManager = getLayoutManager(context)
layoutManager?.isItemPrefetchEnabled = false
recyclerView.layoutManager = layoutManager
if (recyclerView.adapter == null) {

View file

@ -7,8 +7,8 @@ import android.animation.ValueAnimator
import androidx.core.view.ViewCompat
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.SimpleItemAnimator
import com.habitrpg.shared.habitica.LogLevel
import com.habitrpg.shared.habitica.HLogger
import com.habitrpg.shared.habitica.LogLevel
import java.util.*
/**
@ -70,13 +70,13 @@ class SafeDefaultItemAnimator : SimpleItemAnimator() {
// nothing to animate
return
}
if (skipAnimations) {
return
}
// First, remove stuff
for (holder in pendingRemovals) {
animateRemoveImpl(holder)
}
if (skipAnimations) {
return
}
pendingRemovals.clear()
// Next, move stuff
if (movesPending) {