On click of search result, show and focus conversation
Also: remove too-verbose logging on contact sync
This commit is contained in:
parent
61bb038207
commit
0ac3517d51
4 changed files with 16 additions and 13 deletions
|
@ -597,11 +597,6 @@
|
|||
const { expireTimer } = details;
|
||||
const isValidExpireTimer = typeof expireTimer === 'number';
|
||||
if (!isValidExpireTimer) {
|
||||
console.log(
|
||||
'Ignore invalid expire timer.',
|
||||
'Expected numeric `expireTimer`, got:',
|
||||
expireTimer
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,17 +42,22 @@
|
|||
this.$new_contact = this.$('.new-contact');
|
||||
|
||||
this.typeahead = new Whisper.ConversationCollection();
|
||||
this.collection = new Whisper.ConversationCollection([], {
|
||||
comparator(m) {
|
||||
return m.getTitle().toLowerCase();
|
||||
},
|
||||
});
|
||||
this.listenTo(this.collection, 'select', conversation => {
|
||||
this.resetTypeahead();
|
||||
this.trigger('open', conversation);
|
||||
});
|
||||
|
||||
// View to display the matched contacts from typeahead
|
||||
this.typeahead_view = new Whisper.ConversationListView({
|
||||
collection: new Whisper.ConversationCollection([], {
|
||||
comparator(m) {
|
||||
return m.getTitle().toLowerCase();
|
||||
},
|
||||
}),
|
||||
collection: this.collection,
|
||||
});
|
||||
this.$el.append(this.typeahead_view.el);
|
||||
this.initNewContact();
|
||||
// this.listenTo(this.collection, 'reset', this.filterContacts);
|
||||
this.pending = Promise.resolve();
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue