Fix edited rendering poll question in action preview.

This commit is contained in:
Onuray Sahin 2023-01-11 15:58:10 +03:00
parent 912d3e5055
commit 61f7f12d7f

View File

@ -216,8 +216,8 @@ class MessageActionsViewModel @AssistedInject constructor(
noticeEventFormatter.format(timelineEvent, room?.roomSummary()?.isDirect.orFalse()) noticeEventFormatter.format(timelineEvent, room?.roomSummary()?.isDirect.orFalse())
} }
in EventType.POLL_START.values -> { in EventType.POLL_START.values -> {
timelineEvent.root.getClearContent().toModel<MessagePollContent>(catchError = true) (timelineEvent.getVectorLastMessageContent() as? MessagePollContent)?.getBestPollCreationInfo()?.question?.getBestQuestion()
?.getBestPollCreationInfo()?.question?.getBestQuestion() ?: "" ?: stringProvider.getString(R.string.message_reply_to_poll_preview)
} }
else -> null else -> null
} }