Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2142)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java

Issue 2622793003: 📰 Implement offline badge refresh via partial bind (Closed)
Patch Set: address comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/InnerNode.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java
index e293b674dadd66ed2e748555db7e0a73da80c6cc..9823c1e884f6bdd66f70e93bdab3d90fed73490a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java
@@ -22,8 +22,12 @@ public void setParent(NodeParent parent) {
mParent = parent;
}
+ protected void notifyItemRangeChanged(int index, int count, Object payload) {
+ if (mParent != null) mParent.onItemRangeChanged(this, index, count, payload);
+ }
+
protected void notifyItemRangeChanged(int index, int count) {
- if (mParent != null) mParent.onItemRangeChanged(this, index, count);
+ notifyItemRangeChanged(index, count, null);
}
protected void notifyItemRangeInserted(int index, int count) {
@@ -34,6 +38,10 @@ protected void notifyItemRangeRemoved(int index, int count) {
if (mParent != null) mParent.onItemRangeRemoved(this, index, count);
}
+ protected void notifyItemChanged(int index, Object payload) {
+ notifyItemRangeChanged(index, 1, payload);
+ }
+
protected void notifyItemChanged(int index) {
notifyItemRangeChanged(index, 1);
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/InnerNode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698