Rename progress variable to percentage
This commit is contained in:
parent
df1be4f6b1
commit
d59349184f
4 changed files with 10 additions and 10 deletions
|
|
@ -41,7 +41,7 @@ class TimelineItemContentPollFactory @Inject constructor(
|
|||
val answerItems = content.answers.map { answer ->
|
||||
val votesCount = content.votes[answer.id]?.size ?: 0
|
||||
val isSelected = answer.id in userVotes
|
||||
val progress = when {
|
||||
val percentage = when {
|
||||
pollVotesCount == 0 -> 0f
|
||||
content.kind.isDisclosed -> votesCount.toFloat() / pollVotesCount.toFloat()
|
||||
isSelected -> 1f
|
||||
|
|
@ -52,7 +52,7 @@ class TimelineItemContentPollFactory @Inject constructor(
|
|||
isSelected = isSelected,
|
||||
isDisclosed = content.kind.isDisclosed,
|
||||
votesCount = votesCount,
|
||||
progress = progress,
|
||||
percentage = percentage,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue