From 453595833301ac61cd5669ce5f2f530e54abbb76 Mon Sep 17 00:00:00 2001 From: Xen4n Date: Fri, 20 Oct 2023 23:46:05 +0200 Subject: [PATCH] Fix poll fraction calculation for Pleroma --- .../android/ui/displayitems/PollOptionStatusDisplayItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PollOptionStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PollOptionStatusDisplayItem.java index d9ee96a782..16057862cf 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PollOptionStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PollOptionStatusDisplayItem.java @@ -40,7 +40,7 @@ public PollOptionStatusDisplayItem(String parentID, Poll poll, int optionIndex, text=HtmlParser.parseCustomEmoji(option.title, poll.emojis); emojiHelper.setText(text); showResults=poll.isExpired() || poll.voted; - int total=poll.votersCount>0 ? poll.votersCount : poll.votesCount; + int total=poll.votesCount; if(showResults && option.votesCount!=null && total>0){ votesFraction=(float)option.votesCount/(float)total; int mostVotedCount=0;