Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var updates = {};
- //pr_id exists and the contact is starred.
- if( contact.pr_id && contact.starred ){
- return false;
- }
- if(updates[contact.id]){
- clearTimeout(updates[contact.id]);
- }
- updates[contact.id] = setTimeout(function(){
- //apply starred state here.
- updateContact(contact);
- }, 300);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement