Fix - 339 - receive is executed by an event out of angular, apply.

This commit is contained in:
Jean-Baptiste Dominguez 2018-05-22 11:27:10 +09:00
commit c5ae87e898
2 changed files with 6 additions and 5 deletions

View file

@ -126,8 +126,9 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
}
}
$scope.paymentReceivedCoin = $scope.wallet.coin;
$scope.showingPaymentReceived = true;
$scope.$apply();
$scope.$apply(function () {
$scope.showingPaymentReceived = true;
});
}
}
@ -248,8 +249,8 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
$scope.setAddress();
};
$scope.togglePaymentScreen = function() {
$scope.showingPaymentReceived = !$scope.showingPaymentReceived;
$scope.hidePaymentScreen = function() {
$scope.showingPaymentReceived = false;
};
$scope.showWalletSelector = function() {

View file

@ -54,7 +54,7 @@
</div>
</div>
<!-- animation for payment received -->
<div class="payment-received-container" ng-show="showingPaymentReceived" ng-click="togglePaymentScreen()">
<div class="payment-received-container" ng-show="showingPaymentReceived" ng-click="hidePaymentScreen()">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130.2 130.2">
<circle class="path circle" fill="none" stroke="#19B234" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/>
<polyline class="path check" fill="none" stroke="#19B234" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/>