Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 717a0370 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Only switch item animator on content fill if needed" into ub-launcher3-master

parents 70455cd5 035f0d21
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -243,9 +243,13 @@ public final class IconRecentsView extends FrameLayout {
                throw new IllegalStateException("There are less empty item views than the number "
                        + "of items to animate to.");
            }
            // Set item animator for content filling animation. The item animator will switch back
            // to the default on completion.
            // Possible that task list loads faster than adapter changes propagate to layout so
            // only start content fill animation if there aren't any pending adapter changes.
            if (!mTaskRecyclerView.hasPendingAdapterUpdates()) {
                // Set item animator for content filling animation. The item animator will switch
                // back to the default on completion
                mTaskRecyclerView.setItemAnimator(mLoadingContentItemAnimator);
            }
            mTaskAdapter.notifyItemRangeRemoved(numActualItems, numEmptyItems - numActualItems);
            mTaskAdapter.notifyItemRangeChanged(
                    0, numActualItems, CHANGE_EVENT_TYPE_EMPTY_TO_CONTENT);