Merge pull request #411 in FS/freeswitch from ~JMESQUITA/freeswitch:bugfix/FS-7998-dont-prompt-when-recovering-call to master

* commit '070c89996e995c996a8972f89a633d5041621df5':
  FS-7998 #resolve Simply don't ask.
This commit is contained in:
Anthony Minessale II 2015-08-20 18:39:33 -05:00
commit 66da0fa8da
3 changed files with 23 additions and 9 deletions

View File

@ -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) {

View File

@ -34,7 +34,8 @@ storageService.service('storage', ['$rootScope', '$localStorage',
mirrorInput: '',
outgoingBandwidth: '',
incomingBandwidth: '',
vidQual: ''
vidQual: '',
askRecoverCall: true
});
function changeData(verto_data) {

View File

@ -58,6 +58,12 @@
Scale Remote Video To Match Camera Resolution
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="ask_recover_call" ng-value="storage.data.askRecoverCall" ng-model="storage.data.askRecoverCall">
Ask before recovering call
</label>
</div>
</div>