Poll fixes (#1238)
* update cache when voting on a poll * fix poll controls color * don't allow voting on old poll from cache * check for RecyclerView.NO_POSITION in click listener * fix crash when voting in a boosted poll
This commit is contained in:
parent
fae9cd18f1
commit
b8c32a96de
7 changed files with 85 additions and 31 deletions
|
@ -622,9 +622,12 @@ public class TimelineFragment extends SFragment implements
|
|||
}
|
||||
|
||||
public void onVoteInPoll(int position, @NonNull List<Integer> choices) {
|
||||
|
||||
final Status status = statuses.get(position).asRight();
|
||||
|
||||
setVoteForPoll(position, status, status.getPoll().votedCopy(choices));
|
||||
Poll votedPoll = status.getActionableStatus().getPoll().votedCopy(choices);
|
||||
|
||||
setVoteForPoll(position, status, votedPoll);
|
||||
|
||||
timelineCases.voteInPoll(status, choices)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue