Group update recipient typeahead excludes exisiting members

Fixes #199

// FREEBIE
This commit is contained in:
lilia 2015-06-17 12:20:30 -07:00
parent 694f801676
commit e9e875766f

View file

@ -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');