Add automatic flag for update checks
The appstore can then known if a user clicked the check for updates button manually or if it was done by the automatic updater. We will fix appstore so that updates are always provided for manual checks. automatic updates will follow our roll out plan. We do have one issue that the automatic update checker will reset the manual updates when it runs, but this is OK.
This commit is contained in:
@@ -62,7 +62,8 @@ function resetAppUpdateInfo(appId) {
|
||||
}
|
||||
}
|
||||
|
||||
function checkAppUpdates(callback) {
|
||||
function checkAppUpdates(options, callback) {
|
||||
assert.strictEqual(typeof options, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
debug('Checking App Updates');
|
||||
@@ -84,7 +85,7 @@ function checkAppUpdates(callback) {
|
||||
if (app.appStoreId === '') return iteratorDone(); // appStoreId can be '' for dev apps
|
||||
if (app.runState === apps.RSTATE_STOPPED) return iteratorDone(); // stopped apps won't run migration scripts and shouldn't be updated
|
||||
|
||||
appstore.getAppUpdate(app, function (error, updateInfo) {
|
||||
appstore.getAppUpdate(app, options, function (error, updateInfo) {
|
||||
if (error) {
|
||||
debug('Error getting app update info for %s', app.id, error);
|
||||
return iteratorDone(); // continue to next
|
||||
@@ -136,14 +137,15 @@ function checkAppUpdates(callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function checkBoxUpdates(callback) {
|
||||
function checkBoxUpdates(options, callback) {
|
||||
assert.strictEqual(typeof options, 'object');
|
||||
assert.strictEqual(typeof callback, 'function');
|
||||
|
||||
debug('Checking Box Updates');
|
||||
|
||||
gBoxUpdateInfo = null;
|
||||
|
||||
appstore.getBoxUpdate(function (error, updateInfo) {
|
||||
appstore.getBoxUpdate(options, function (error, updateInfo) {
|
||||
if (error || !updateInfo) return callback(error);
|
||||
|
||||
gBoxUpdateInfo = updateInfo;
|
||||
|
||||
Reference in New Issue
Block a user