From 070c89996e995c996a8972f89a633d5041621df5 Mon Sep 17 00:00:00 2001 From: Joao Mesquita Date: Thu, 20 Aug 2015 19:00:40 -0300 Subject: [PATCH] FS-7998 #resolve Simply don't ask. FS-7998 Add option to settings interface and persist it on local storage. --- .../verto_communicator/js/controllers.js | 23 ++++++++++++------- .../verto_communicator/js/storage-service.js | 3 ++- .../partials/modal_settings.html | 6 +++++ 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/html5/verto/verto_communicator/js/controllers.js b/html5/verto/verto_communicator/js/controllers.js index 7ce1cf2fc9..e7f55fe119 100644 --- a/html5/verto/verto_communicator/js/controllers.js +++ b/html5/verto/verto_communicator/js/controllers.js @@ -283,17 +283,24 @@ vertoControllers.controller('MainController', ['$scope', '$rootScope', }); $rootScope.$on('page.incall', function(event, data) { - prompt({ - title: 'Oops, Active Call in Course.', - message: 'It seems you were in a call before leaving the last time. Wanna go back to that?' - }).then(function() { + if (storage.data.askRecoverCall) { + prompt({ + title: 'Oops, Active Call in Course.', + message: 'It seems you were in a call before leaving the last time. Wanna go back to that?' + }).then(function() { + verto.changeData(storage); + console.log('redirect to incall page'); + $location.path('/incall'); + }, function() { + storage.data.userStatus = 'connecting'; + verto.hangup(); + }); + } else { verto.changeData(storage); console.log('redirect to incall page'); $location.path('/incall'); - }, function() { - storage.data.userStatus = 'connecting'; - verto.hangup(); - }); + } + }); $rootScope.callActive = function(data) { diff --git a/html5/verto/verto_communicator/js/storage-service.js b/html5/verto/verto_communicator/js/storage-service.js index f0c185ecba..616839eaa1 100644 --- a/html5/verto/verto_communicator/js/storage-service.js +++ b/html5/verto/verto_communicator/js/storage-service.js @@ -34,7 +34,8 @@ storageService.service('storage', ['$rootScope', '$localStorage', mirrorInput: '', outgoingBandwidth: '', incomingBandwidth: '', - vidQual: '' + vidQual: '', + askRecoverCall: true }); function changeData(verto_data) { diff --git a/html5/verto/verto_communicator/partials/modal_settings.html b/html5/verto/verto_communicator/partials/modal_settings.html index 5c07e74679..55c0ad2205 100644 --- a/html5/verto/verto_communicator/partials/modal_settings.html +++ b/html5/verto/verto_communicator/partials/modal_settings.html @@ -58,6 +58,12 @@ Scale Remote Video To Match Camera Resolution +
+ +