Merge branch 'better-poll-voting'
This commit is contained in:
commit
0950e2eb7f
|
@ -89,10 +89,12 @@ public class PollOptionStatusDisplayItem extends StatusDisplayItem{
|
|||
button.setBackground(progressBg);
|
||||
itemView.setSelected(item.isMostVoted);
|
||||
icon.setSelected(item.poll.ownVotes.contains(item.poll.options.indexOf(item.option)));
|
||||
icon.setVisibility(item.poll.voted && item.poll.ownVotes.isEmpty() ? View.GONE : View.VISIBLE);
|
||||
percent.setText(String.format(Locale.getDefault(), "%d%%", Math.round(item.votesFraction*100f)));
|
||||
}else{
|
||||
itemView.setSelected(item.poll.selectedOptions!=null && item.poll.selectedOptions.contains(item.option));
|
||||
button.setBackgroundResource(R.drawable.bg_poll_option_clickable);
|
||||
icon.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue