From 82431c3c12263be6a0cf513fd962ea7923081771 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 5 Aug 2015 10:54:47 -0700 Subject: [PATCH] Update compose typeahead after fetching Fixes #322 // FREEBIE --- js/views/recipients_input_view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/views/recipients_input_view.js b/js/views/recipients_input_view.js index 53f170e2..47fbfbfd 100644 --- a/js/views/recipients_input_view.js +++ b/js/views/recipients_input_view.js @@ -28,7 +28,7 @@ storeName: 'conversations', model: Whisper.Conversation, fetchContacts: function() { - this.fetch({ conditions: { type: 'private' } }); + return this.fetch({ reset: true, conditions: { type: 'private' } }); } }); @@ -91,6 +91,7 @@ }) }); this.$('.contacts').append(this.typeahead_view.el); + this.listenTo(this.typeahead, 'reset', this.filterContacts); this.initNewContact(); },