hide icons in own polls

closes #137
This commit is contained in:
sk 2022-12-10 22:40:35 +01:00
parent 5b28468efd
commit 116328adb9
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}
}