mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 01:15:54 +03:00
Fix missing sender information after edits
Fixes https://github.com/vector-im/element-android/issues/3184
This commit is contained in:
parent
c4a4a5d41c
commit
47aa787ecb
3 changed files with 8 additions and 0 deletions
|
@ -16,6 +16,7 @@ Bugfix 🐛:
|
|||
- Fix issues on Android 11 (#3067)
|
||||
- Fix issue when opening encrypted files (#3186)
|
||||
- Fix wording issue (#3242)
|
||||
- Fix missing sender information after edits (#3184)
|
||||
|
||||
Translations 🗣:
|
||||
-
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.matrix.android.sdk.api.session.events.model.Event
|
|||
import org.matrix.android.sdk.api.session.events.model.EventType
|
||||
import org.matrix.android.sdk.api.session.events.model.RelationType
|
||||
import org.matrix.android.sdk.api.session.events.model.getRelationContent
|
||||
import org.matrix.android.sdk.api.session.events.model.isEdition
|
||||
import org.matrix.android.sdk.api.session.events.model.isReply
|
||||
import org.matrix.android.sdk.api.session.events.model.toModel
|
||||
import org.matrix.android.sdk.api.session.room.model.EventAnnotationsSummary
|
||||
|
@ -151,6 +152,10 @@ fun TimelineEvent.isReply(): Boolean {
|
|||
return root.isReply()
|
||||
}
|
||||
|
||||
fun TimelineEvent.isEdition(): Boolean {
|
||||
return root.isEdition()
|
||||
}
|
||||
|
||||
fun TimelineEvent.getTextEditableContent(): String? {
|
||||
val lastContent = getLastMessageContent()
|
||||
return if (isReply()) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import org.matrix.android.sdk.api.session.room.send.SendState
|
|||
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
|
||||
import org.matrix.android.sdk.api.session.room.timeline.getLastMessageContent
|
||||
import org.matrix.android.sdk.api.session.room.timeline.hasBeenEdited
|
||||
import org.matrix.android.sdk.api.session.room.timeline.isEdition
|
||||
import org.matrix.android.sdk.internal.crypto.model.event.EncryptedEventContent
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -69,6 +70,7 @@ class MessageInformationDataFactory @Inject constructor(private val session: Ses
|
|||
|| nextEvent.root.getClearType() !in listOf(EventType.MESSAGE, EventType.STICKER, EventType.ENCRYPTED)
|
||||
|| isNextMessageReceivedMoreThanOneHourAgo
|
||||
|| isTileTypeMessage(nextEvent)
|
||||
|| nextEvent.isEdition()
|
||||
|
||||
val time = dateFormatter.format(event.root.originServerTs, DateFormatKind.MESSAGE_SIMPLE)
|
||||
val e2eDecoration = getE2EDecoration(event)
|
||||
|
|
Loading…
Reference in a new issue