Skip to content

Commit

Permalink
show own vote after voted
Browse files Browse the repository at this point in the history
closes #113
  • Loading branch information
sk22 committed Dec 5, 2022
1 parent e14dfda commit 4ab9e25
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ public Holder(Activity activity, ViewGroup parent){
@Override
public void onBind(PollOptionStatusDisplayItem item){
text.setText(item.text);
icon.setVisibility(item.showResults ? View.GONE : View.VISIBLE);
// icon.setVisibility(item.showResults ? View.GONE : View.VISIBLE);
percent.setVisibility(item.showResults ? View.VISIBLE : View.GONE);
itemView.setClickable(!item.showResults);
if(item.showResults){
icon.setSelected(item.poll.ownVotes.contains(item.poll.options.indexOf(item.option)));
progressBg.setLevel(Math.round(10000f*item.votesFraction));
button.setBackground(progressBg);
itemView.setSelected(item.isMostVoted);
Expand Down

0 comments on commit 4ab9e25

Please sign in to comment.