Skip to content

Instantly share code, notes, and snippets.

@iaindooley
Created April 29, 2019 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iaindooley/e5b043147c78a06157aaec67eb289dfe to your computer and use it in GitHub Desktop.
Save iaindooley/e5b043147c78a06157aaec67eb289dfe to your computer and use it in GitHub Desktop.
Update member count
function updateMemberCountWhenAdded(notification)
{
var notif = new Notification(notification);
notif.addedMemberToCard();
updateMemberCountOnCard(notif.card());
}
function updateMemberCountWhenRemoved(notification)
{
var notif = new Notification(notification);
notif.removedMemberFromCard();
updateMemberCountOnCard(notif.card());
}
function updateMemberCountOnCard(card)
{
if(card.currentList().name() == "Signup sheets")
{
card.setName("Signed up: "+card.members().length());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment