mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Adding a description under undisclosed poll when not yet ended
This commit is contained in:
parent
8da88f9263
commit
9fb19af39c
3 changed files with 3 additions and 2 deletions
|
@ -107,7 +107,7 @@ class PollItemViewStateFactory @Inject constructor(
|
||||||
): PollViewState {
|
): PollViewState {
|
||||||
return PollViewState(
|
return PollViewState(
|
||||||
question = question,
|
question = question,
|
||||||
totalVotes = "",
|
totalVotes = stringProvider.getString(R.string.poll_undisclosed_not_ended),
|
||||||
canVote = true,
|
canVote = true,
|
||||||
optionViewStates = pollCreationInfo?.answers?.map { answer ->
|
optionViewStates = pollCreationInfo?.answers?.map { answer ->
|
||||||
val isMyVote = pollResponseSummary?.myVote == answer.id
|
val isMyVote = pollResponseSummary?.myVote == answer.id
|
||||||
|
|
|
@ -2980,6 +2980,7 @@
|
||||||
<item quantity="other">Based on %1$d votes</item>
|
<item quantity="other">Based on %1$d votes</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<string name="poll_no_votes_cast">No votes cast</string>
|
<string name="poll_no_votes_cast">No votes cast</string>
|
||||||
|
<string name="poll_undisclosed_not_ended">Results will be visible when the poll is ended</string>
|
||||||
<plurals name="poll_total_vote_count_before_ended_and_not_voted">
|
<plurals name="poll_total_vote_count_before_ended_and_not_voted">
|
||||||
<item quantity="one">%1$d vote cast. Vote to the see the results</item>
|
<item quantity="one">%1$d vote cast. Vote to the see the results</item>
|
||||||
<item quantity="other">%1$d votes cast. Vote to the see the results</item>
|
<item quantity="other">%1$d votes cast. Vote to the see the results</item>
|
||||||
|
|
|
@ -143,7 +143,7 @@ class PollItemViewStateFactoryTest {
|
||||||
|
|
||||||
pollViewState shouldBeEqualTo PollViewState(
|
pollViewState shouldBeEqualTo PollViewState(
|
||||||
question = A_POLL_CONTENT.getBestPollCreationInfo()?.question?.getBestQuestion() ?: "",
|
question = A_POLL_CONTENT.getBestPollCreationInfo()?.question?.getBestQuestion() ?: "",
|
||||||
totalVotes = "",
|
totalVotes = stringProvider.instance.getString(R.string.poll_undisclosed_not_ended),
|
||||||
canVote = true,
|
canVote = true,
|
||||||
optionViewStates = A_POLL_CONTENT.getBestPollCreationInfo()?.answers?.map { answer ->
|
optionViewStates = A_POLL_CONTENT.getBestPollCreationInfo()?.answers?.map { answer ->
|
||||||
PollOptionViewState.PollUndisclosed(
|
PollOptionViewState.PollUndisclosed(
|
||||||
|
|
Loading…
Reference in a new issue