Add room list preview for poll response and end events.

This commit is contained in:
Onuray Sahin 2021-12-07 14:00:06 +03:00
parent 75b544a110
commit 71d7270da5
2 changed files with 8 additions and 0 deletions

View File

@ -66,6 +66,12 @@ class DisplayableEventFormatter @Inject constructor(
return timelineEvent.root.getClearContent().toModel<MessagePollContent>(catchError = true)?.pollCreationInfo?.question?.question
?: stringProvider.getString(R.string.sent_a_poll)
}
EventType.POLL_RESPONSE -> {
return stringProvider.getString(R.string.poll_response_room_list_preview)
}
EventType.POLL_END -> {
return stringProvider.getString(R.string.poll_end_room_list_preview)
}
EventType.MESSAGE -> {
timelineEvent.getLastMessageContent()?.let { messageContent ->
when (messageContent.msgType) {

View File

@ -3671,4 +3671,6 @@
<string name="end_poll_confirmation_description">Are you sure you want to end this poll? This will stop people from being able to vote and will display the final results of the poll.</string>
<string name="end_poll_confirmation_approve_button">End poll</string>
<string name="labs_enable_polls">Enable Polls</string>
<string name="poll_response_room_list_preview">Vote casted</string>
<string name="poll_end_room_list_preview">Poll ended</string>
</resources>