mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 19:15:04 -04:00
Less buggy rejection of calls when busy
This commit is contained in:
parent
6f256e6380
commit
55fe0d8adc
2 changed files with 20 additions and 13 deletions
|
@ -134,6 +134,7 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
|
|||
if ($rootScope.currentCall && $rootScope.currentCall.state != 'ended') {
|
||||
console.trace("rejecting call because we're already in a call");
|
||||
call.hangup();
|
||||
return;
|
||||
}
|
||||
call.onError = $scope.onCallError;
|
||||
call.onHangup = $scope.onCallHangup;
|
||||
|
@ -152,13 +153,15 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
|
|||
$scope.feedback = errStr;
|
||||
}
|
||||
|
||||
$rootScope.onCallHangup = function() {
|
||||
$timeout(function() {
|
||||
var icon = angular.element('#callEndedIcon');
|
||||
$animate.addClass(icon, 'callIconRotate');
|
||||
$timeout(function(){
|
||||
$rootScope.currentCall = undefined;
|
||||
}, 4070);
|
||||
}, 100);
|
||||
$rootScope.onCallHangup = function(call) {
|
||||
if (call == $rootScope.currentCall) {
|
||||
$timeout(function() {
|
||||
var icon = angular.element('#callEndedIcon');
|
||||
$animate.addClass(icon, 'callIconRotate');
|
||||
$timeout(function(){
|
||||
$rootScope.currentCall = undefined;
|
||||
}, 4070);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
}]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue