Skip to content

Commit

Permalink
[IMP] mail: better resolution of image previews in discuss
Browse files Browse the repository at this point in the history
closes odoo#180742

Signed-off-by: Alexandre Kühn (aku) <[email protected]>
  • Loading branch information
alexkuhn committed Sep 21, 2024
1 parent 2101430 commit 6f595dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions addons/mail/static/src/core/common/attachment_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export class AttachmentList extends Component {
}
return url(attachment.urlRoute, {
...attachment.urlQueryParams,
width: this.imagesWidth,
height: this.props.imagesHeight,
width: this.imagesWidth * 2,
height: this.props.imagesHeight * 2,
});
}

Expand Down
2 changes: 1 addition & 1 deletion addons/mail/static/tests/thread/attachment_list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,6 @@ test("img file has proper src in discuss.channel", async () => {
await start();
await openDiscuss(channelId);
await contains(
`.o-mail-AttachmentImage[title='test.png'] img[data-src='${getOrigin()}/discuss/channel/${channelId}/image/${attachmentId}?filename=test.png&width=1920&height=300']`
`.o-mail-AttachmentImage[title='test.png'] img[data-src*='${getOrigin()}/discuss/channel/${channelId}/image/${attachmentId}?filename=test.png']`
);
});

0 comments on commit 6f595dd

Please sign in to comment.