From 93fee014b41fadb36c237dc4d3a5216732fe4865 Mon Sep 17 00:00:00 2001 From: brantje Date: Sun, 2 Oct 2016 18:30:53 +0200 Subject: [PATCH] Remove share request when accepted --- js/app/controllers/credential.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/app/controllers/credential.js b/js/app/controllers/credential.js index b06a312d..e222ff84 100644 --- a/js/app/controllers/credential.js +++ b/js/app/controllers/credential.js @@ -64,7 +64,6 @@ angular.module('passmanApp') } ShareService.getPendingRequests().then(function (shareRequests) { - console.log(shareRequests) if(shareRequests.length > 0){ $scope.incoming_share_requests = shareRequests; jQuery('.share_popup').dialog({ @@ -84,6 +83,8 @@ angular.module('passmanApp') crypted_shared_key = EncryptService.encryptString(crypted_shared_key); ShareService.saveSharingRequest(share_request, crypted_shared_key).then(function (result) { + var idx = $scope.incoming_share_requests.indexOf(share_request); + $scope.incoming_share_requests.splice(idx, 1); console.log(result) }) };