Fix selected tag filter doesn't stick after returning from sharing or editing (Fixes #255)

This commit is contained in:
brantje 2017-02-18 15:30:46 +01:00
parent 86be5a270e
commit ca4f6dfeaf
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
3 changed files with 6 additions and 2 deletions

View file

@ -102,7 +102,7 @@
}
angular.merge($scope.active_vault.credentials, _credentials);
$scope.show_spinner = false;
$rootScope.$broadcast('credentials_loaded');
if(!vault.private_sharing_key){
var key_size = 1024;
ShareService.generateRSAKeys(key_size).then(function (kp) {

View file

@ -81,6 +81,10 @@
$scope.selectedTags.push(tag);
};
$rootScope.$on('credentials_loaded', function () {
$rootScope.$broadcast('selected_tags_updated', $scope.selectedTags);
});
$scope.available_tags = TagService.getTags();
$scope.$watch(function () {

View file

@ -48,7 +48,7 @@
if(!scope.vault.hasOwnProperty('credentials')){
return;
}
angular.forEach(scope.vault.credentials, function (credential) {
var pos = scope.filteredCredentials.map(function(c) { return c.guid; }).indexOf(credential.guid);