remove redundant toHtml from StatusBaseViewHolder (#1625)

This commit is contained in:
Konrad Pozniak 2020-01-07 19:38:08 +01:00 committed by GitHub
parent bec1ce8b09
commit 441a1c1f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -473,16 +473,12 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
setAttachmentClickListener(imageView, listener, i, attachment, true);
}
final String hiddenContentText;
if (sensitive) {
hiddenContentText = context.getString(R.string.status_sensitive_media_title);
sensitiveMediaWarning.setText(R.string.status_sensitive_media_title);
} else {
hiddenContentText = context.getString(R.string.status_media_hidden_title);
sensitiveMediaWarning.setText(R.string.status_media_hidden_title);
}
sensitiveMediaWarning.setText(HtmlUtils.fromHtml(hiddenContentText));
sensitiveMediaWarning.setVisibility(showingContent ? View.GONE : View.VISIBLE);
sensitiveMediaShow.setVisibility(showingContent ? View.VISIBLE : View.GONE);
sensitiveMediaShow.setOnClickListener(v -> {