Don't add duplicate contacts in the list when en-/disable an address book.
This commit is contained in:
parent
8e4832bd12
commit
a4614f83ff
|
@ -1621,6 +1621,7 @@ Contacts={
|
|||
var contactlist = $('#contacts ul[data-id="'+b+'"]');
|
||||
for(var c in book.contacts) {
|
||||
if(book.contacts[c].id == undefined) { continue; }
|
||||
if($('#contacts li[data-id="'+book.contacts[c]['id']+'"][data-id="'+book.contacts[c]['bookid']+'"]').length == 0) {
|
||||
var contact = Contacts.UI.Card.createEntry(book.contacts[c]);
|
||||
if(c == self.batchnum-5) {
|
||||
contact.bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
|
||||
|
@ -1635,6 +1636,7 @@ Contacts={
|
|||
}
|
||||
contactlist.append(contact);
|
||||
}
|
||||
}
|
||||
});
|
||||
if($('#contacts h3').length > 1) {
|
||||
$('#contacts li').draggable({
|
||||
|
|
Loading…
Reference in New Issue