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

Ignore Live Dev toggle when in a connecting state #7049

Closed
wants to merge 2 commits into from
Closed
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
12 changes: 9 additions & 3 deletions src/LiveDevelopment/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,17 @@ define(function main(require, exports, module) {
}
}

/** Toggles LiveDevelopment and synchronizes the state of UI elements that reports LiveDevelopment status */
/**
* Toggles LiveDevelopment and synchronizes the state of UI elements that reports LiveDevelopment status
*
* Stop Live Dev when in an active state (ACTIVE, OUT_OF_SYNC, SYNC_ERROR).
* Start Live Dev when in an inactive state (ERROR, INACTIVE).
* Do nothing when in a connecting state (CONNECTING, LOADING_AGENTS).
*/
function _handleGoLiveCommand() {
if (LiveDevelopment.status >= LiveDevelopment.STATUS_CONNECTING) {
if (LiveDevelopment.status >= LiveDevelopment.STATUS_ACTIVE) {
LiveDevelopment.close();
} else {
} else if (LiveDevelopment.status <= LiveDevelopment.STATUS_INACTIVE) {
if (!params.get("skipLiveDevelopmentInfo") && !PreferencesManager.getViewState("livedev.afterFirstLaunch")) {
PreferencesManager.setViewState("livedev.afterFirstLaunch", "true");
Dialogs.showModalDialog(
Expand Down