summaryrefslogtreecommitdiff
path: root/www/js/PortalLoginCtrl.js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-10-08 12:20:05 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-10-08 12:20:05 -0400
commita5e032c1d38152644ffabead6536dd14b0433119 (patch)
treefab0aaac9947767a72a7ec2d256ec7828dce4d93 /www/js/PortalLoginCtrl.js
parente333d3adee02f3fe417c01234654163d51abec60 (diff)
cleaned up and simplified websocket connection handling
Diffstat (limited to 'www/js/PortalLoginCtrl.js')
-rw-r--r--www/js/PortalLoginCtrl.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js
index 4207c18e..ee4d0e12 100644
--- a/www/js/PortalLoginCtrl.js
+++ b/www/js/PortalLoginCtrl.js
@@ -86,7 +86,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic
$state.go('lowversion', {"ver":data});
}
});
- initWebSocket();
+ EventServer.refresh();
$state.go($rootScope.lastState ? $rootScope.lastState : 'montage', $rootScope.lastStateParam);
},
// coming here means auth error
@@ -144,17 +144,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic
return 0;
}
- function initWebSocket()
- {
- var loginData = ZMDataModel.getLogin();
-
-
- ZMDataModel.zmLog (" webSocketStart: attempting to start a WSS connection");
- EventServer.start();
- $rootScope.websocketActive = 1;
-
-
- }
+
function unlock(touchVerified) {
ZMDataModel.zmDebug("Trying to unlock PIN");
@@ -166,7 +156,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic
zmAutoLogin.doLogin("authenticating...")
.then(function (data) // success
{
- initWebSocket();
+ EventServer.refresh();
// don't get stuck in this state
// will happen if you switch to background in portal state
if ($rootScope.lastState == "zm-portal-login") {