diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index 51b655b63..06b8e60b6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -215,8 +215,11 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder { LinkHelper.setClickableText(this.content, emojifiedText, mentions, listener); if (poll != null) { setupPoll(poll, emojis, listener); + } else { + hidePoll(); } } else { + hidePoll(); LinkHelper.setClickableMentions(this.content, mentions, listener); } if (TextUtils.isEmpty(this.content.getText())) { @@ -224,14 +227,12 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder { } else { this.content.setVisibility(View.VISIBLE); } - setPollVisible(poll != null && expanded); } - private void setPollVisible(boolean visible) { - int visibility = visible ? View.VISIBLE : View.GONE; - pollButton.setVisibility(visibility); - pollDescription.setVisibility(visibility); - pollOptions.setVisibility(visibility); + private void hidePoll() { + pollButton.setVisibility(View.GONE); + pollDescription.setVisibility(View.GONE); + pollOptions.setVisibility(View.GONE); } private void setAvatar(String url,