Fix HistoryScene lag when pop backstack from detailScene

Why supportsPredictiveItemAnimations = true cause lag?
This commit is contained in:
tarsin committed 2023-03-09 17:39:38 +08:00
1 parent f27319e8cb
commit 58910be98e
1 file changed
+1
@@ -140,6 +140,7 @@ class HistoryScene : BaseToolbarScene() {
val layoutManager = AutoStaggeredGridLayoutManager(0, StaggeredGridLayoutManager.VERTICAL)
layoutManager.setColumnSize(resources.getDimensionPixelOffset(Settings.detailSizeResId))
layoutManager.setStrategy(AutoStaggeredGridLayoutManager.STRATEGY_MIN_SIZE)
layoutManager.supportsPredictiveItemAnimations = false
binding.recyclerView.layoutManager = layoutManager
val itemTouchHelper = ItemTouchHelper(HistoryItemTouchHelperCallback())
itemTouchHelper.attachToRecyclerView(binding.recyclerView)