From ea9e5183dcb6277e072a9b5aab43f668ace0284d Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Fri, 21 Jan 2022 16:20:08 +0300 Subject: [PATCH] Fix rendering edited polls in timeline. --- .../android/sdk/api/session/room/timeline/TimelineEvent.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEvent.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEvent.kt index 45dc322420..3f7d2d1278 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEvent.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/timeline/TimelineEvent.kt @@ -133,7 +133,7 @@ fun TimelineEvent.getEditedEventId(): String? { fun TimelineEvent.getLastMessageContent(): MessageContent? { return when (root.getClearType()) { EventType.STICKER -> root.getClearContent().toModel() - EventType.POLL_START -> root.getClearContent().toModel() + EventType.POLL_START -> (annotations?.editSummary?.latestContent ?: root.getClearContent()).toModel() else -> (annotations?.editSummary?.latestContent ?: root.getClearContent()).toModel() } }