diff --git a/changelog.d/4997.bugfix b/changelog.d/4997.bugfix
new file mode 100644
index 0000000000..0bdfbede25
--- /dev/null
+++ b/changelog.d/4997.bugfix
@@ -0,0 +1 @@
+Fix an error in string resource
\ No newline at end of file
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt
index ec0c247a03..56a2910d10 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt
@@ -190,7 +190,11 @@ class MessageItemFactory @Inject constructor(
when {
isEnded -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_after_ended, it, it)
didUserVoted -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_voted, it, it)
- else -> stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_not_voted, it, it)
+ else -> if (it == 0) {
+ stringProvider.getString(R.string.poll_no_votes_cast)
+ } else {
+ stringProvider.getQuantityString(R.plurals.poll_total_vote_count_before_ended_and_not_voted, it, it)
+ }
}
}
diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml
index 110d1e651b..7d8d24e47b 100644
--- a/vector/src/main/res/values/strings.xml
+++ b/vector/src/main/res/values/strings.xml
@@ -3693,8 +3693,8 @@
- Based on %1$d vote
- Based on %1$d votes
+ No votes cast
- - No votes cast
- %1$d vote cast. Vote to the see the results
- %1$d votes cast. Vote to the see the results