Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit faa5dd7

Browse files
committed
Merge pull request #5085 from TomMalbran/tom/issue-5062
Fix #5062: Update notification is no longer modal
2 parents a12c0ba + b26d101 commit faa5dd7

4 files changed

Lines changed: 17 additions & 8 deletions

File tree

src/brackets.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,11 @@ define(function (require, exports, module) {
257257
// check once a day, plus 2 minutes,
258258
// as the check will skip if the last check was not -24h ago
259259
window.setInterval(UpdateNotification.checkForUpdate, 86520000);
260-
UpdateNotification.checkForUpdate();
260+
261+
// Check for updates on App Ready
262+
AppInit.appReady(function () {
263+
UpdateNotification.checkForUpdate();
264+
});
261265
}
262266
}
263267

src/styles/brackets_patterns_override.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@
451451
.modal-backdrop {
452452
opacity: 0;
453453
}
454-
.modal-backdrop:last-child {
454+
.last-backdrop {
455455
/* Only show the last modal backdrop */
456456
opacity: 0.5;
457457
}

src/utils/UpdateNotification.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ define(function (require, exports, module) {
3333

3434
var Dialogs = require("widgets/Dialogs"),
3535
DefaultDialogs = require("widgets/DefaultDialogs"),
36-
NativeApp = require("utils/NativeApp"),
3736
PreferencesManager = require("preferences/PreferencesManager"),
38-
Strings = require("strings"),
39-
StringUtils = require("utils/StringUtils"),
4037
Global = require("utils/Global"),
38+
NativeApp = require("utils/NativeApp"),
39+
StringUtils = require("utils/StringUtils"),
40+
Strings = require("strings"),
4141
UpdateDialogTemplate = require("text!htmlContent/update-dialog.html"),
4242
UpdateListTemplate = require("text!htmlContent/update-list.html");
4343

@@ -329,7 +329,7 @@ define(function (require, exports, module) {
329329

330330
// Append locale to version info URL
331331
_versionInfoURL = brackets.config.update_info_url + brackets.getLocale() + ".json";
332-
332+
333333
// Define public API
334334
exports.checkForUpdate = checkForUpdate;
335335
});

src/widgets/Dialogs.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ define(function (require, exports, module) {
252252

253253
// Remove the dialog instance from the DOM.
254254
$dlg.remove();
255+
$(".modal-backdrop:last").addClass("last-backdrop");
255256

256257
// Remove our global keydown handler.
257258
KeyBindingManager.removeGlobalKeydownHook(keydownHook);
@@ -273,7 +274,9 @@ define(function (require, exports, module) {
273274
_dismissDialog($dlg, $(this).attr("data-button-id"));
274275
});
275276
}
276-
277+
278+
$(".last-backdrop").removeClass("last-backdrop");
279+
277280
// Run the dialog
278281
$dlg
279282
.modal({
@@ -283,7 +286,9 @@ define(function (require, exports, module) {
283286
})
284287
// Updates the z-index of the modal dialog and the backdrop
285288
.css("z-index", zIndex + 1)
286-
.next().css("z-index", zIndex);
289+
.next()
290+
.css("z-index", zIndex)
291+
.addClass("last-backdrop");
287292

288293
zIndex += 2;
289294

0 commit comments

Comments
 (0)