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
1 changed files with 2 additions and 2 deletions

View File

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