Reload contacts when resetting a recipients input
Fixes #272 // FREEBIE
This commit is contained in:
parent
f5f4c128f9
commit
6a98fc8278
1 changed files with 6 additions and 2 deletions
|
@ -26,7 +26,10 @@
|
||||||
],
|
],
|
||||||
database: Whisper.Database,
|
database: Whisper.Database,
|
||||||
storeName: 'conversations',
|
storeName: 'conversations',
|
||||||
model: Whisper.Conversation
|
model: Whisper.Conversation,
|
||||||
|
fetchContacts: function() {
|
||||||
|
this.fetch({ conditions: { type: 'private' } });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Whisper.ContactPillView = Whisper.View.extend({
|
Whisper.ContactPillView = Whisper.View.extend({
|
||||||
|
@ -79,7 +82,7 @@
|
||||||
|
|
||||||
// Collection of contacts to match user input against
|
// Collection of contacts to match user input against
|
||||||
this.typeahead = new ContactsTypeahead();
|
this.typeahead = new ContactsTypeahead();
|
||||||
this.typeahead.fetch({ conditions: { type: 'private' } });
|
this.typeahead.fetchContacts();
|
||||||
|
|
||||||
// View to display the matched contacts from typeahead
|
// View to display the matched contacts from typeahead
|
||||||
this.typeahead_view = new Whisper.ConversationListView({
|
this.typeahead_view = new Whisper.ConversationListView({
|
||||||
|
@ -164,6 +167,7 @@
|
||||||
);
|
);
|
||||||
this.recipients.reset([]);
|
this.recipients.reset([]);
|
||||||
this.resetTypeahead();
|
this.resetTypeahead();
|
||||||
|
this.typeahead.fetchContacts();
|
||||||
},
|
},
|
||||||
|
|
||||||
resetTypeahead: function() {
|
resetTypeahead: function() {
|
||||||
|
|
Loading…
Reference in a new issue