click on image message in convo while selection mode, selects message

This commit is contained in:
Audric Ackermann 2020-11-04 11:14:06 +11:00
parent b865810cb0
commit b9dbef86a5
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
3 changed files with 10 additions and 5 deletions

View File

@ -80,9 +80,6 @@
}
}
&__container {
transition: background-color $session-transition-duration;
}
}
.message {

View File

@ -400,7 +400,6 @@
@include color-svg('../images/timer-00.svg', $color-white-08);
}
// When status indicators are overlaid on top of an image, they use different colors
.module-expire-timer--with-image-no-caption {
background-color: $color-dark-05;

View File

@ -344,6 +344,7 @@ export class Message extends React.PureComponent<Props, State> {
// tslint:disable-next-line max-func-body-length cyclomatic-complexity
public renderAttachment() {
const {
id,
attachments,
text,
collapseMetadata,
@ -351,6 +352,8 @@ export class Message extends React.PureComponent<Props, State> {
direction,
quote,
onClickAttachment,
multiSelectMode,
onSelectMessage,
} = this.props;
const { imageBroken } = this.state;
@ -391,7 +394,13 @@ export class Message extends React.PureComponent<Props, State> {
bottomOverlay={!collapseMetadata}
i18n={window.i18n}
onError={this.handleImageErrorBound}
onClickAttachment={onClickAttachment}
onClickAttachment={(attachment: AttachmentType) => {
if (multiSelectMode) {
onSelectMessage(id);
} else if (onClickAttachment) {
onClickAttachment(attachment);
}
}}
/>
</div>
);