Fix #484
This commit is contained in:
parent
1764e5f3d1
commit
6e6fdbccd5
|
@ -526,7 +526,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||||
DraftMediaAttachment da=new DraftMediaAttachment();
|
DraftMediaAttachment da=new DraftMediaAttachment();
|
||||||
da.serverAttachment=att;
|
da.serverAttachment=att;
|
||||||
da.description=att.description;
|
da.description=att.description;
|
||||||
da.uri=Uri.parse(att.previewUrl);
|
da.uri=att.previewUrl!=null ? Uri.parse(att.previewUrl) : null;
|
||||||
da.state=AttachmentUploadState.DONE;
|
da.state=AttachmentUploadState.DONE;
|
||||||
attachmentsView.addView(createMediaAttachmentView(da));
|
attachmentsView.addView(createMediaAttachmentView(da));
|
||||||
attachments.add(da);
|
attachments.add(da);
|
||||||
|
@ -919,7 +919,8 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||||
View thumb=getActivity().getLayoutInflater().inflate(R.layout.compose_media_thumb, attachmentsView, false);
|
View thumb=getActivity().getLayoutInflater().inflate(R.layout.compose_media_thumb, attachmentsView, false);
|
||||||
ImageView img=thumb.findViewById(R.id.thumb);
|
ImageView img=thumb.findViewById(R.id.thumb);
|
||||||
if(draft.serverAttachment!=null){
|
if(draft.serverAttachment!=null){
|
||||||
ViewImageLoader.load(img, draft.serverAttachment.blurhashPlaceholder, new UrlImageLoaderRequest(draft.serverAttachment.previewUrl, V.dp(250), V.dp(250)));
|
if(draft.serverAttachment.previewUrl!=null)
|
||||||
|
ViewImageLoader.load(img, draft.serverAttachment.blurhashPlaceholder, new UrlImageLoaderRequest(draft.serverAttachment.previewUrl, V.dp(250), V.dp(250)));
|
||||||
}else{
|
}else{
|
||||||
if(draft.mimeType.startsWith("image/")){
|
if(draft.mimeType.startsWith("image/")){
|
||||||
ViewImageLoader.load(img, null, new UrlImageLoaderRequest(draft.uri, V.dp(250), V.dp(250)));
|
ViewImageLoader.load(img, null, new UrlImageLoaderRequest(draft.uri, V.dp(250), V.dp(250)));
|
||||||
|
|
Loading…
Reference in New Issue