|
|
|
@ -151,16 +151,15 @@
|
|
|
|
|
this.fileInput = new Whisper.FileInputView({
|
|
|
|
|
el: this.$('.attachment-list'),
|
|
|
|
|
});
|
|
|
|
|
this.listenTo(
|
|
|
|
|
this.fileInput,
|
|
|
|
|
'attachments-changed',
|
|
|
|
|
this.toggleMicrophone
|
|
|
|
|
);
|
|
|
|
|
this.listenTo(
|
|
|
|
|
this.fileInput,
|
|
|
|
|
'choose-attachment',
|
|
|
|
|
this.onChooseAttachment
|
|
|
|
|
);
|
|
|
|
|
this.listenTo(this.fileInput, 'staged-attachments-changed', () => {
|
|
|
|
|
this.view.resetScrollPosition();
|
|
|
|
|
this.toggleMicrophone();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const getHeaderProps = () => {
|
|
|
|
|
const expireTimer = this.model.get('expireTimer');
|
|
|
|
@ -1485,7 +1484,6 @@
|
|
|
|
|
if (event.key !== 'Escape') {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.closeEmojiPanel();
|
|
|
|
|
},
|
|
|
|
|
openEmojiPanel() {
|
|
|
|
@ -1493,6 +1491,7 @@
|
|
|
|
|
this.emojiPanel = new EmojiPanel(this.$emojiPanelContainer[0], {
|
|
|
|
|
onClick: this.insertEmoji.bind(this),
|
|
|
|
|
});
|
|
|
|
|
this.view.resetScrollPosition();
|
|
|
|
|
this.updateMessageFieldSize({});
|
|
|
|
|
},
|
|
|
|
|
closeEmojiPanel() {
|
|
|
|
@ -1502,6 +1501,7 @@
|
|
|
|
|
|
|
|
|
|
this.$emojiPanelContainer.empty().outerHeight(0);
|
|
|
|
|
this.emojiPanel = null;
|
|
|
|
|
this.view.resetScrollPosition();
|
|
|
|
|
this.updateMessageFieldSize({});
|
|
|
|
|
},
|
|
|
|
|
insertEmoji(e) {
|
|
|
|
|