Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/subscriptionClasses.js

Issue 6013081427640320: Issue 537 - Mark first few downloads (Closed)
Patch Set: Created Nov. 10, 2014, 5:57 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/subscriptionClasses.js
===================================================================
--- a/lib/subscriptionClasses.js
+++ b/lib/subscriptionClasses.js
@@ -218,6 +218,8 @@
result._homepage = obj.homepage;
if ("lastDownload" in obj)
result._lastDownload = parseInt(obj.lastDownload) || 0;
+ if ("downloadCount" in obj)
+ result.downloadCount = obj.downloadCount;
Wladimir Palant 2014/11/10 19:18:15 Should be a number with the comments above address
Thomas Greiner 2014/11/11 17:17:18 Done.
}
catch (e)
{
@@ -560,6 +562,12 @@
* @type Boolean
*/
upgradeRequired: false,
+
+ /**
+ * Number indicating how often the object was downloaded.
+ * @type Number
+ */
+ downloadCount: 1,
Wladimir Palant 2014/11/10 19:18:15 Again, I think that the default should be 0.
Thomas Greiner 2014/11/11 17:17:18 Done.
/**
* See Subscription.serialize()
@@ -583,5 +591,7 @@
buffer.push("version=" + this.version);
if (this.requiredVersion)
buffer.push("requiredVersion=" + this.requiredVersion);
+ if (this.downloadCount)
+ buffer.push("downloadCount=" + this.downloadCount);
}
};
« lib/notification.js ('K') | « lib/notification.js ('k') | lib/synchronizer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld