Affect polls

This commit is contained in:
tom79 2019-05-05 17:26:30 +02:00
parent c7a3ad91fe
commit 4077802949
1 changed files with 7 additions and 9 deletions

View File

@ -554,15 +554,13 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
holder.multiple_choice.setVisibility(View.GONE); holder.multiple_choice.setVisibility(View.GONE);
holder.single_choice.setVisibility(View.GONE); holder.single_choice.setVisibility(View.GONE);
holder.submit_vote.setVisibility(View.GONE); holder.submit_vote.setVisibility(View.GONE);
if( (status.getPoll() != null && status.getPoll().getOptionsList() != null) Poll poll;
|| (status.getReblog() != null && status.getReblog().getPoll() != null && status.getReblog().getPoll().getOptionsList() != null) if( status.getReblog() != null) {
){ poll = status.getReblog().getPoll();
Poll poll; }else {
if( status.getReblog() != null) { poll = status.getPoll();
poll = status.getReblog().getPoll(); }
}else { if( poll != null && poll.getOptionsList() != null){
poll = status.getPoll();
}
if( poll.isVoted() || poll.isExpired()){ if( poll.isVoted() || poll.isExpired()){
holder.rated.setVisibility(View.VISIBLE); holder.rated.setVisibility(View.VISIBLE);
List<BarItem> items = new ArrayList<>(); List<BarItem> items = new ArrayList<>();