mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
FileInputView: Event on attachment change to hide/show microphone
This commit is contained in:
@@ -151,6 +151,11 @@
|
||||
this.fileInput = new Whisper.FileInputView({
|
||||
el: this.$('.attachment-list'),
|
||||
});
|
||||
this.listenTo(
|
||||
this.fileInput,
|
||||
'attachments-changed',
|
||||
this.toggleMicrophone
|
||||
);
|
||||
|
||||
const getHeaderProps = () => {
|
||||
const expireTimer = this.model.get('expireTimer');
|
||||
|
||||
@@ -122,11 +122,13 @@
|
||||
|
||||
onCloseAttachment(attachment) {
|
||||
this.attachments = _.without(this.attachments, attachment);
|
||||
this.trigger('attachments-changed');
|
||||
this.render();
|
||||
},
|
||||
|
||||
onClose() {
|
||||
this.attachments = [];
|
||||
this.trigger('attachments-changed');
|
||||
this.render();
|
||||
},
|
||||
|
||||
@@ -267,6 +269,7 @@
|
||||
|
||||
this.attachments.push(attachment);
|
||||
this.render();
|
||||
this.trigger('attachments-changed');
|
||||
},
|
||||
|
||||
async maybeAddAttachment(file) {
|
||||
|
||||
Reference in New Issue
Block a user