Remove one level of indentation
This commit is contained in:
@@ -95,34 +95,34 @@ function checkAppUpdates(callback) {
|
||||
|
||||
if (oldState[app.id] === newState[app.id]) {
|
||||
debug('Skipping notification of app update %s since user was already notified', app.id);
|
||||
iteratorDone();
|
||||
} else {
|
||||
settings.getSubscription(function (error, result) {
|
||||
return iteratorDone();
|
||||
}
|
||||
|
||||
settings.getSubscription(function (error, result) {
|
||||
if (error) {
|
||||
debug(error);
|
||||
return iteratorDone();
|
||||
}
|
||||
|
||||
// always send notifications if user is on the free plan
|
||||
if (result.plan.id === 'free' || result.plan.id === 'undecided') {
|
||||
debug('Notifying user of app update for %s from %s to %s', app.id, app.manifest.version, updateInfo.manifest.version);
|
||||
mailer.appUpdateAvailable(app, updateInfo);
|
||||
return iteratorDone();
|
||||
}
|
||||
|
||||
// only send notifications if update pattern is 'never'
|
||||
settings.getAutoupdatePattern(function (error, result) {
|
||||
if (error) {
|
||||
debug(error);
|
||||
return iteratorDone();
|
||||
}
|
||||
|
||||
// always send notifications if user is on the free plan
|
||||
if (result.plan.id === 'free' || result.plan.id === 'undecided') {
|
||||
} else if (result === constants.AUTOUPDATE_PATTERN_NEVER) {
|
||||
debug('Notifying user of app update for %s from %s to %s', app.id, app.manifest.version, updateInfo.manifest.version);
|
||||
mailer.appUpdateAvailable(app, updateInfo);
|
||||
return iteratorDone();
|
||||
}
|
||||
|
||||
// only send notifications if update pattern is 'never'
|
||||
settings.getAutoupdatePattern(function (error, result) {
|
||||
if (error) {
|
||||
debug(error);
|
||||
} else if (result === constants.AUTOUPDATE_PATTERN_NEVER) {
|
||||
debug('Notifying user of app update for %s from %s to %s', app.id, app.manifest.version, updateInfo.manifest.version);
|
||||
mailer.appUpdateAvailable(app, updateInfo);
|
||||
}
|
||||
|
||||
iteratorDone();
|
||||
});
|
||||
iteratorDone();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}, function () {
|
||||
newState.box = loadState().box; // preserve the latest box state information
|
||||
|
||||
Reference in New Issue
Block a user