enable save of attachments on click on single generic attachment

This commit is contained in:
Audric Ackermann 2020-11-24 16:40:55 +11:00
parent 0addf2146a
commit 51ea762bce
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
2 changed files with 11 additions and 2 deletions

View File

@ -473,7 +473,16 @@ export class Message extends React.PureComponent<Props, State> {
</div>
) : (
<div className="module-message__generic-attachment__icon-container">
<div className="module-message__generic-attachment__icon">
<div
role="button"
className="module-message__generic-attachment__icon"
onClick={(e: any) => {
if (this.props?.onDownload) {
e.stopPropagation();
this.props.onDownload(firstAttachment);
}
}}
>
{extension ? (
<div className="module-message__generic-attachment__icon__extension">
{extension}

View File

@ -455,7 +455,7 @@ export class SessionCompositionBox extends React.Component<Props, State> {
if (!conversationModel) {
return;
}
const allPubKeys = conversationModel.get('members') as Array<string>;
const allPubKeys = conversationModel.get('members');
const allMembers = allPubKeys.map(pubKey => {
const conv = window.ConversationController.get(pubKey);