From 62ff735878f1a17ffeaec5b6989af7f8ca8f9c08 Mon Sep 17 00:00:00 2001 From: Vavassor Date: Wed, 1 Feb 2017 04:25:22 -0500 Subject: [PATCH] Fixed content warnings not being reset properly, causing them to appear in other statuses. --- .../java/com/keylesspalace/tusky/StatusViewHolder.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/StatusViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/StatusViewHolder.java index 04776705..b870b87e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/StatusViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/StatusViewHolder.java @@ -279,6 +279,11 @@ public class StatusViewHolder extends RecyclerView.ViewHolder { }); } + public void hideSpoilerText() { + contentWarningBar.setVisibility(View.GONE); + content.setVisibility(View.VISIBLE); + } + public void setupButtons(final StatusActionListener listener, final int position) { avatar.setOnClickListener(new View.OnClickListener() { @Override @@ -350,7 +355,9 @@ public class StatusViewHolder extends RecyclerView.ViewHolder { if (status.getVisibility() == Status.Visibility.PRIVATE) { disableReblogging(); } - if (!status.getSpoilerText().isEmpty()) { + if (status.getSpoilerText().isEmpty()) { + hideSpoilerText(); + } else { setSpoilerText(status.getSpoilerText()); } }