Skip to content

Commit

Permalink
Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
busykai authored and sprintr committed Jul 13, 2015
1 parent 06c9aa6 commit b27c8ff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
8 changes: 8 additions & 0 deletions src/extensibility/ExtensionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,13 @@ define(function (require, exports, module) {
function hasExtensionsToDisable() {
return Object.keys(_idsToDisable).length > 0;
}

/**
* Unmarks all the extensions that have been marked for disabling.
*/
function unmarkAllForDisabling() {
_idsToDisable = {};
}

/**
* If a downloaded package appears to be an update, mark the extension for update.
Expand Down Expand Up @@ -902,6 +909,7 @@ define(function (require, exports, module) {
exports.hasExtensionsToRemove = hasExtensionsToRemove;
exports.markForDisabling = markForDisabling;
exports.isMarkedForDisabling = isMarkedForDisabling;
exports.unmarkAllForDisabling = unmarkAllForDisabling;
exports.hasExtensionsToDisable = hasExtensionsToDisable;
exports.updateFromDownload = updateFromDownload;
exports.removeUpdate = removeUpdate;
Expand Down
10 changes: 4 additions & 6 deletions src/extensibility/ExtensionManagerDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,15 @@ define(function (require, exports, module) {
updateErrors,
disableErrors;

removeExtensionsPromise = ExtensionManager.removeMarkedExtensions();
removeExtensionsPromise
removeExtensionsPromise = ExtensionManager.removeMarkedExtensions()
.fail(function (errorArray) {
removeErrors = errorArray;
});
updateExtensionsPromise = ExtensionManager.updateExtensions();
updateExtensionsPromise
updateExtensionsPromise = ExtensionManager.updateExtensions()
.fail(function (errorArray) {
updateErrors = errorArray;
});
disableExtensionsPromise = ExtensionManager.disableMarkedExtensions();
disableExtensionsPromise
disableExtensionsPromise = ExtensionManager.disableMarkedExtensions()
.fail(function (errorArray) {
disableErrors = errorArray;
});
Expand Down Expand Up @@ -207,6 +204,7 @@ define(function (require, exports, module) {
dlg.close();
ExtensionManager.cleanupUpdates();
ExtensionManager.unmarkAllForRemoval();
ExtensionManager.unmarkAllForDisabling();
}
});
}
Expand Down
1 change: 1 addition & 0 deletions src/extensibility/Package.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ define(function (require, exports, module) {
.done(result.resolve)
.fail(result.reject);
});
return result.promise();
}

/**
Expand Down

0 comments on commit b27c8ff

Please sign in to comment.