mirror of https://github.com/nextcloud/contacts
Fixed group list not updating when adding/deleting a group
This commit is contained in:
parent
870bdc9b92
commit
8ceca17efa
|
@ -14,6 +14,15 @@ angular.module('contactsApp')
|
|||
return $routeParams.gid;
|
||||
};
|
||||
|
||||
// Update groupList on contact add/delete/update
|
||||
ContactService.registerObserverCallback(function() {
|
||||
$scope.$apply(function() {
|
||||
ContactService.getGroups().then(function(groups) {
|
||||
ctrl.groups = _.unique(initialGroups.concat(groups));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
ctrl.setSelected = function (selectedGroup) {
|
||||
SearchService.cleanSearch();
|
||||
$routeParams.gid = selectedGroup;
|
||||
|
|
|
@ -146,6 +146,7 @@ angular.module('contactsApp')
|
|||
return DavClient.updateCard(contact.data, {json: true}).then(function(xhr) {
|
||||
var newEtag = xhr.getResponseHeader('ETag');
|
||||
contact.setETag(newEtag);
|
||||
notifyObservers('update', contact.uid());
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue