"Fix" poll percentages for pleroma
Based on 0272ddab2eb7e24374c0a8f30ed14656edb71f5a captainepoch.
This commit is contained in:
parent
8cc1263e14
commit
6232949932
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue