[go: nahoru, domu]

Skip to content

Commit

Permalink
Move UI.cancelReconnect() to related functions
Browse files Browse the repository at this point in the history
  • Loading branch information
samhed committed Nov 12, 2017
1 parent c5005f1 commit 68c78f7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,18 @@ var UI = {
UI.connect(null, UI.reconnect_password);
},

cancelReconnect: function() {
if (UI.reconnect_callback !== null) {
clearTimeout(UI.reconnect_callback);
UI.reconnect_callback = null;
}

UI.updateVisualState('disconnected');

UI.openControlbar();
UI.openConnectPanel();
},

connectFinished: function (e) {
UI.connected = true;
UI.inhibit_reconnect = false;
Expand Down Expand Up @@ -1136,18 +1148,6 @@ var UI = {
UI.showStatus(msg, 'error');
},

cancelReconnect: function() {
if (UI.reconnect_callback !== null) {
clearTimeout(UI.reconnect_callback);
UI.reconnect_callback = null;
}

UI.updateVisualState('disconnected');

UI.openControlbar();
UI.openConnectPanel();
},

/* ------^-------
* /CONNECTION
* ==============
Expand Down

0 comments on commit 68c78f7

Please sign in to comment.