Reset app update indicator when an update was triggered

Fixes #48
This commit is contained in:
Johannes
2016-11-07 15:14:06 +01:00
parent 5e0ed1dff3
commit 4fd5b369f8
2 changed files with 16 additions and 2 deletions
+12 -2
View File
@@ -5,7 +5,8 @@ exports = module.exports = {
checkBoxUpdates: checkBoxUpdates,
getUpdateInfo: getUpdateInfo,
resetUpdateInfo: resetUpdateInfo
resetUpdateInfo: resetUpdateInfo,
resetAppUpdateInfo: resetAppUpdateInfo
};
var apps = require('./apps.js'),
@@ -42,8 +43,17 @@ function getUpdateInfo() {
}
function resetUpdateInfo() {
gAppUpdateInfo = { };
gBoxUpdateInfo = null;
resetAppUpdateInfo();
}
// If no appId provided all apps are reset
function resetAppUpdateInfo(appId) {
if (!appId) {
gAppUpdateInfo = {};
} else {
delete gAppUpdateInfo[appId];
}
}
function getAppUpdate(app, callback) {