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:
parent
77e2ff4953
commit
c133a6e606
17 changed files with 46 additions and 46 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue