Fix displaying reaction row in message action list (#788)

* Fix displaying reaction row in message action list

* Rename `sendState` to `localSendState` and make it nullable.

Create an `isRemote` helper to detect if an event comes from the server instead.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
Jorge Martin Espinosa 2023-07-06 18:51:51 +02:00 committed by GitHub
parent 77e2ff4953
commit c133a6e606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 46 additions and 46 deletions

View file

@ -28,7 +28,7 @@ data class EventTimelineItem(
val isLocal: Boolean,
val isOwn: Boolean,
val isRemote: Boolean,
val localSendState: EventSendState?,
val localSendState: LocalEventSendState?,
val reactions: List<EventReaction>,
val sender: UserId,
val senderProfile: ProfileTimelineDetails,

View file

@ -18,15 +18,15 @@ package io.element.android.libraries.matrix.api.timeline.item.event
import io.element.android.libraries.matrix.api.core.EventId
sealed interface EventSendState {
object NotSentYet : EventSendState
object Canceled : EventSendState
sealed interface LocalEventSendState {
object NotSentYet : LocalEventSendState
object Canceled : LocalEventSendState
data class SendingFailed(
val error: String
) : EventSendState
) : LocalEventSendState
data class Sent(
val eventId: EventId
) : EventSendState
) : LocalEventSendState
}