Fix polls
This commit is contained in:
@@ -91,6 +91,7 @@ public class PollOptionStatusDisplayItem extends StatusDisplayItem{
|
|||||||
bg.setLevel(Math.round(10000f*item.votesFraction));
|
bg.setLevel(Math.round(10000f*item.votesFraction));
|
||||||
button.setBackground(bg);
|
button.setBackground(bg);
|
||||||
itemView.setSelected(item.isMostVoted);
|
itemView.setSelected(item.isMostVoted);
|
||||||
|
check.setSelected(item.poll.ownVotes!=null && item.poll.ownVotes.contains(item.optionIndex));
|
||||||
percent.setText(String.format(Locale.getDefault(), "%d%%", Math.round(item.votesFraction*100f)));
|
percent.setText(String.format(Locale.getDefault(), "%d%%", Math.round(item.votesFraction*100f)));
|
||||||
}else{
|
}else{
|
||||||
itemView.setSelected(item.poll.selectedOptions!=null && item.poll.selectedOptions.contains(item.option));
|
itemView.setSelected(item.poll.selectedOptions!=null && item.poll.selectedOptions.contains(item.option));
|
||||||
|
|||||||
Reference in New Issue
Block a user