[IMPROVE] Show full image when available (#3370)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
This commit is contained in:
parent
69a67ea998
commit
b795d4b013
|
@ -106,8 +106,10 @@ class AttachmentView extends React.Component {
|
||||||
handleSave = async () => {
|
handleSave = async () => {
|
||||||
const { attachment } = this.state;
|
const { attachment } = this.state;
|
||||||
const { user, baseUrl } = this.props;
|
const { user, baseUrl } = this.props;
|
||||||
const { image_url, image_type, video_url, video_type } = attachment;
|
const {
|
||||||
const url = image_url || video_url;
|
title_link, image_url, image_type, video_url, video_type
|
||||||
|
} = attachment;
|
||||||
|
const url = title_link || image_url || video_url;
|
||||||
const mediaAttachment = formatAttachmentUrl(url, user.id, user.token, baseUrl);
|
const mediaAttachment = formatAttachmentUrl(url, user.id, user.token, baseUrl);
|
||||||
|
|
||||||
if (isAndroid) {
|
if (isAndroid) {
|
||||||
|
@ -173,7 +175,7 @@ class AttachmentView extends React.Component {
|
||||||
let content = null;
|
let content = null;
|
||||||
|
|
||||||
if (attachment && attachment.image_url) {
|
if (attachment && attachment.image_url) {
|
||||||
const uri = formatAttachmentUrl(attachment.image_url, user.id, user.token, baseUrl);
|
const uri = formatAttachmentUrl(attachment.title_link || attachment.image_url, user.id, user.token, baseUrl);
|
||||||
content = this.renderImage(encodeURI(uri));
|
content = this.renderImage(encodeURI(uri));
|
||||||
} else if (attachment && attachment.video_url) {
|
} else if (attachment && attachment.video_url) {
|
||||||
const uri = formatAttachmentUrl(attachment.video_url, user.id, user.token, baseUrl);
|
const uri = formatAttachmentUrl(attachment.video_url, user.id, user.token, baseUrl);
|
||||||
|
|
Loading…
Reference in New Issue