Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,19 @@ define(function LiveDevelopment(require, exports, module) {

return null;
}

/**
* Removes the given CSS/JSDocument from _relatedDocuments. Signals that the
* given file is no longer associated with the HTML document that is live (e.g.
* if the related file has been deleted on disk).
*/
function _handleRelatedDocumentDeleted(event, liveDoc) {
var index = _relatedDocuments.indexOf(liveDoc);
if (index !== -1) {
$(liveDoc).on("deleted", _handleRelatedDocumentDeleted);
_relatedDocuments.splice(index, 1);
}
}

/** Close a live document */
function _closeDocument() {
Expand All @@ -139,19 +152,6 @@ define(function LiveDevelopment(require, exports, module) {
}
}

/**
* Removes the given CSS/JSDocument from _relatedDocuments. Signals that the
* given file is no longer associated with the HTML document that is live (e.g.
* if the related file has been deleted on disk).
*/
function _handleRelatedDocumentDeleted(event, liveDoc) {
var index = _relatedDocuments.indexOf(liveDoc);
if (index !== -1) {
$(liveDoc).on("deleted", _handleRelatedDocumentDeleted);
_relatedDocuments.splice(index, 1);
}
}

/** Create a live version of a Brackets document */
function _createDocument(doc, editor) {
var DocClass = _classForDocument(doc);
Expand Down Expand Up @@ -276,7 +276,7 @@ define(function LiveDevelopment(require, exports, module) {
if (err === "CANCEL") {
return;
}
if (retryCount > 4) {
if (retryCount > 6) {
_setStatus(-1);
Dialogs.showModalDialog(
Dialogs.DIALOG_ID_LIVE_DEVELOPMENT,
Expand Down