| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
|
| index 156bb65ee6dcc678dc30af589299af3b27a91409..15299e11e0f845d12fd94151717a4782d1483f00 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
|
| @@ -255,6 +255,28 @@ public void onItemRangeRemoved(TreeNode child, int index, int count) {
|
| }
|
|
|
| @Override
|
| + protected void notifyItemRangeInserted(int index, int count) {
|
| + super.notifyItemRangeInserted(index, count);
|
| + notifyNeighbourModified(index, count);
|
| + }
|
| +
|
| + @Override
|
| + protected void notifyItemRangeRemoved(int index, int count) {
|
| + super.notifyItemRangeRemoved(index, count);
|
| + notifyNeighbourModified(index, count);
|
| + }
|
| +
|
| + private void notifyNeighbourModified(int index, int modifiedRange) {
|
| + int aboveNeighbour = index - 1;
|
| + int belowNeighbour = index + modifiedRange;
|
| +
|
| + if (aboveNeighbour >= 0) notifyItemChanged(aboveNeighbour, PartialUpdateId.CARD_BACKGROUND);
|
| + if (belowNeighbour < getItemCount()) {
|
| + notifyItemChanged(belowNeighbour, PartialUpdateId.CARD_BACKGROUND);
|
| + }
|
| + }
|
| +
|
| + @Override
|
| public void onBindViewHolder(NewTabPageViewHolder holder, int position) {
|
| super.onBindViewHolder(holder, position);
|
| childSeen(position);
|
|
|