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();
|
||||
},
|
||||
|
||||
|
|
|
@ -115,8 +115,11 @@ input.search {
|
|||
position: relative;
|
||||
border-radius: 4px;
|
||||
|
||||
&.active {
|
||||
&:focus {
|
||||
outline: solid 1px $blue;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-image: url('../images/x.svg');
|
||||
background-repeat: no-repeat;
|
||||
background-size: $search-x-size;
|
||||
|
|
|
@ -460,7 +460,7 @@ body.dark-theme {
|
|||
color: $color-dark-05;
|
||||
background-color: $color-black;
|
||||
|
||||
&.active {
|
||||
&:focus {
|
||||
outline: solid 1px $blue;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue