Skip to content

Commit

Permalink
Moved the check for updates on start up to be done after the app is r…
Browse files Browse the repository at this point in the history
…eady
  • Loading branch information
TomMalbran committed Sep 10, 2013
1 parent f4101ce commit ae9136d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ define(function (require, exports, module) {
// check once a day, plus 2 minutes,
// as the check will skip if the last check was not -24h ago
window.setInterval(UpdateNotification.checkForUpdate, 86520000);
UpdateNotification.checkForUpdate();
}
}

Expand Down
9 changes: 5 additions & 4 deletions src/utils/UpdateNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ define(function (require, exports, module) {

updates.Strings = Strings;
$updateList.html(Mustache.render(UpdateListTemplate, updates));

AppInit.appReady(function () {
$dlg.find("button").focus();
});
}

/**
Expand Down Expand Up @@ -335,6 +331,11 @@ define(function (require, exports, module) {
// Append locale to version info URL
_versionInfoURL = brackets.config.update_info_url + brackets.getLocale() + ".json";

// Check for updates on App Ready
AppInit.appReady(function () {
checkForUpdate();
});

// Define public API
exports.checkForUpdate = checkForUpdate;
});

0 comments on commit ae9136d

Please sign in to comment.