Last active
January 19, 2017 18:31
-
-
Save srhyne/2f61fa3ce00b0b656484fb628d175eae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment