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

Unified Diff: messageResponder.js

Issue 29339387: Issue 3890 - Fix "Downloading..." indication for subscriptions on the options page (Closed)
Patch Set: Wrapped long line Created April 6, 2016, 8:57 a.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
« no previous file with comments | « background.js ('k') | options.js » ('j') | options.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: messageResponder.js
===================================================================
--- a/messageResponder.js
+++ b/messageResponder.js
@@ -64,8 +64,14 @@
return result;
}
- var convertSubscription = convertObject.bind(null, ["disabled",
- "downloadStatus", "homepage", "lastDownload", "title", "url"]);
+ function convertSubscription(subscription)
+ {
+ var obj = convertObject(["disabled", "downloadStatus", "homepage",
+ "lastDownload", "title", "url"], subscription);
+ obj.isDownloading = Synchronizer.isExecuting(subscription);
Thomas Greiner 2016/04/06 14:19:43 `Synchronizer.isExecuting()` is expecting a URL bu
Sebastian Noack 2016/04/06 17:22:22 Well spotted. Done.
+ return obj;
+ }
+
var convertFilter = convertObject.bind(null, ["text"]);
var changeListeners = new global.ext.PageMap();
@@ -396,9 +402,6 @@
Synchronizer.execute(subscription, true);
}
break;
- case "subscriptions.isDownloading":
- callback(Synchronizer.isExecuting(message.url));
- break;
}
});
})(this);
« no previous file with comments | « background.js ('k') | options.js » ('j') | options.js » ('J')

Powered by Google App Engine
This is Rietveld