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

Delta Between Two Patch Sets: messageResponder.js

Issue 29339387: Issue 3890 - Fix "Downloading..." indication for subscriptions on the options page (Closed)
Left Patch Set: Wrapped long line Created April 6, 2016, 8:57 a.m.
Right Patch Set: Pass URL to Synchronizer.isExecuting() Created April 6, 2016, 5:20 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « background.js ('k') | options.js » ('j') | options.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 var result = {}; 61 var result = {};
62 for (var i = 0; i < keys.length; i++) 62 for (var i = 0; i < keys.length; i++)
63 result[keys[i]] = obj[keys[i]]; 63 result[keys[i]] = obj[keys[i]];
64 return result; 64 return result;
65 } 65 }
66 66
67 function convertSubscription(subscription) 67 function convertSubscription(subscription)
68 { 68 {
69 var obj = convertObject(["disabled", "downloadStatus", "homepage", 69 var obj = convertObject(["disabled", "downloadStatus", "homepage",
70 "lastDownload", "title", "url"], subscription); 70 "lastDownload", "title", "url"], subscription);
71 obj.isDownloading = Synchronizer.isExecuting(subscription); 71 obj.isDownloading = Synchronizer.isExecuting(subscription.url);
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.
72 return obj; 72 return obj;
73 } 73 }
74 74
75 var convertFilter = convertObject.bind(null, ["text"]); 75 var convertFilter = convertObject.bind(null, ["text"]);
76 76
77 var changeListeners = new global.ext.PageMap(); 77 var changeListeners = new global.ext.PageMap();
78 var listenedPreferences = Object.create(null); 78 var listenedPreferences = Object.create(null);
79 var listenedFilterChanges = Object.create(null); 79 var listenedFilterChanges = Object.create(null);
80 var messageTypes = { 80 var messageTypes = {
81 "app": "app.respond", 81 "app": "app.respond",
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 for (var i = 0; i < subscriptions.length; i++) 398 for (var i = 0; i < subscriptions.length; i++)
399 { 399 {
400 var subscription = subscriptions[i]; 400 var subscription = subscriptions[i];
401 if (subscription instanceof DownloadableSubscription) 401 if (subscription instanceof DownloadableSubscription)
402 Synchronizer.execute(subscription, true); 402 Synchronizer.execute(subscription, true);
403 } 403 }
404 break; 404 break;
405 } 405 }
406 }); 406 });
407 })(this); 407 })(this);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld