fix poll button being visible below voted poll (#1612)
This commit is contained in:
parent
8a9d62e654
commit
88d59da13c
1 changed files with 7 additions and 6 deletions
|
@ -215,8 +215,11 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
||||||
LinkHelper.setClickableText(this.content, emojifiedText, mentions, listener);
|
LinkHelper.setClickableText(this.content, emojifiedText, mentions, listener);
|
||||||
if (poll != null) {
|
if (poll != null) {
|
||||||
setupPoll(poll, emojis, listener);
|
setupPoll(poll, emojis, listener);
|
||||||
|
} else {
|
||||||
|
hidePoll();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
hidePoll();
|
||||||
LinkHelper.setClickableMentions(this.content, mentions, listener);
|
LinkHelper.setClickableMentions(this.content, mentions, listener);
|
||||||
}
|
}
|
||||||
if (TextUtils.isEmpty(this.content.getText())) {
|
if (TextUtils.isEmpty(this.content.getText())) {
|
||||||
|
@ -224,14 +227,12 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
||||||
} else {
|
} else {
|
||||||
this.content.setVisibility(View.VISIBLE);
|
this.content.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
setPollVisible(poll != null && expanded);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setPollVisible(boolean visible) {
|
private void hidePoll() {
|
||||||
int visibility = visible ? View.VISIBLE : View.GONE;
|
pollButton.setVisibility(View.GONE);
|
||||||
pollButton.setVisibility(visibility);
|
pollDescription.setVisibility(View.GONE);
|
||||||
pollDescription.setVisibility(visibility);
|
pollOptions.setVisibility(View.GONE);
|
||||||
pollOptions.setVisibility(visibility);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setAvatar(String url,
|
private void setAvatar(String url,
|
||||||
|
|
Loading…
Reference in a new issue