mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 20:29:10 +03:00
Merge pull request #8471 from vector-im/bugfix/cjs/poll-finish-contents
Show correct details when a poll is ended.
This commit is contained in:
commit
48df1136ca
2 changed files with 5 additions and 1 deletions
1
changelog.d/8471.bugfix
Normal file
1
changelog.d/8471.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
The correct title and options are now displayed When a poll that was edited is ended.
|
|
@ -286,7 +286,10 @@ class MessageItemFactory @Inject constructor(
|
|||
} else {
|
||||
null
|
||||
}
|
||||
val pollContent = pollStartEvent?.root?.getClearContent()?.toModel<MessagePollContent>()
|
||||
|
||||
val editedContent = pollStartEvent?.annotations?.editSummary?.latestEdit?.getClearContent()?.toModel<MessagePollContent>()?.newContent
|
||||
val latestContent = editedContent ?: pollStartEvent?.root?.getClearContent()
|
||||
val pollContent = latestContent?.toModel<MessagePollContent>()
|
||||
|
||||
return if (pollContent == null) {
|
||||
val title = stringProvider.getString(R.string.message_reply_to_ended_poll_preview).toEpoxyCharSequence()
|
||||
|
|
Loading…
Add table
Reference in a new issue