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

Unified Diff: chrome/browser/resources/md_history/history_list.js

Issue 2255033002: [MD History] Copy stats from the old history page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sidebar_stats
Patch Set: add_stats Created 4 years, 4 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
Index: chrome/browser/resources/md_history/history_list.js
diff --git a/chrome/browser/resources/md_history/history_list.js b/chrome/browser/resources/md_history/history_list.js
index 1ab8a7a94633fd8365193247fbf4fb2588d10249..0bc93621a44ab9bb3bdff312c210b7cbcff823bc 100644
--- a/chrome/browser/resources/md_history/history_list.js
+++ b/chrome/browser/resources/md_history/history_list.js
@@ -83,6 +83,11 @@ Polymer({
this.fire('unselect-all');
}
+ var offset = (this.historyData_ ? this.historyData_.length : 0);
+ results.forEach(function(item, index) {
+ item.index = index + offset;
+ });
+
if (this.historyData_) {
// If we have previously received data, push the new items onto the
// existing array.
@@ -95,6 +100,12 @@ Polymer({
}
},
+ refreshItemIndexes: function() {
+ this.historyData_.forEach(function(item, index) {
+ item.index = index;
+ });
+ },
+
/**
* Called when the page is scrolled to near the bottom of the list.
* @private

Powered by Google App Engine
This is Rietveld 408576698