"Fix" poll percentages for pleroma

Based on 0272ddab2eb7e24374c0a8f30ed14656edb71f5a captainepoch.
This commit is contained in:
fruye 2022-12-05 21:22:17 +01:00
parent 8cc1263e14
commit 6232949932
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ fun calculatePercent(fraction: Int, totalVoters: Int?, totalVotes: Int): Int {
return if (fraction == 0) {
0
} else {
val total = totalVoters ?: totalVotes
val total = totalVotes
(fraction / total.toDouble() * 100).roundToInt()
}
}