From 71d7270da5e49976a9a3812a6755ae38fbb1ab54 Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Tue, 7 Dec 2021 14:00:06 +0300 Subject: [PATCH] Add room list preview for poll response and end events. --- .../detail/timeline/format/DisplayableEventFormatter.kt | 6 ++++++ vector/src/main/res/values/strings.xml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/format/DisplayableEventFormatter.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/format/DisplayableEventFormatter.kt index 7eea309448..0ffa1d7074 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/format/DisplayableEventFormatter.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/format/DisplayableEventFormatter.kt @@ -66,6 +66,12 @@ class DisplayableEventFormatter @Inject constructor( return timelineEvent.root.getClearContent().toModel(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) { diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 92bec84d7c..ae738a7d8c 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -3671,4 +3671,6 @@ 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. End poll Enable Polls + Vote casted + Poll ended