Merge branch 'bugfix-2' of https://github.com/connyduck/Tusky into connyduck-bugfix-2

main
Vavassor 8 years ago
commit 5e47a4514b
  1. 12
      app/src/main/java/com/keylesspalace/tusky/StatusViewHolder.java

@ -249,14 +249,23 @@ class StatusViewHolder extends RecyclerView.ViewHolder {
previews[i].setVisibility(View.VISIBLE);
if(previewUrl == null || previewUrl.isEmpty()) {
Picasso.with(context)
.load(mediaPreviewUnloadedId)
.into(previews[i]);
} else {
Picasso.with(context)
.load(previewUrl)
.placeholder(mediaPreviewUnloadedId)
.into(previews[i]);
}
final String url = attachments[i].url;
final Status.MediaAttachment.Type type = attachments[i].type;
if(url == null || url.isEmpty()) {
previews[i].setOnClickListener(null);
} else {
previews[i].setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -265,6 +274,9 @@ class StatusViewHolder extends RecyclerView.ViewHolder {
});
}
}
if (sensitive) {
sensitiveMediaWarning.setVisibility(View.VISIBLE);
sensitiveMediaWarning.setOnClickListener(new View.OnClickListener() {

Loading…
Cancel
Save