Group update recipient typeahead excludes exisiting members

Fixes #199

// FREEBIE
pull/749/head
lilia 10 years ago
parent 694f801676
commit e9e875766f

@ -31,6 +31,13 @@
this.recipients_view = new Whisper.RecipientsInputView({
placeholder: "Add member"
});
this.listenTo(this.recipients_view.typeahead, 'sync', function() {
this.model.contactCollection.models.forEach(function(model) {
if (this.recipients_view.typeahead.get(model)) {
this.recipients_view.typeahead.remove(model);
}
}.bind(this));
});
this.$('.scrollable').append(this.recipients_view.el);
this.$('.avatar').addClass('default');

Loading…
Cancel
Save