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

pull/1387/head
Audric Ackermann 5 years ago
parent b865810cb0
commit b9dbef86a5
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

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

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

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

Loading…
Cancel
Save