Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app/views/AttachmentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ class AttachmentView extends React.Component {
handleSave = async () => {
const { attachment } = this.state;
const { user, baseUrl } = this.props;
const { image_url, image_type, video_url, video_type } = attachment;
const url = image_url || video_url;
const {
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);

if (isAndroid) {
Expand Down Expand Up @@ -173,7 +175,7 @@ class AttachmentView extends React.Component {
let content = null;

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));
} else if (attachment && attachment.video_url) {
const uri = formatAttachmentUrl(attachment.video_url, user.id, user.token, baseUrl);
Expand Down