Live location : format the endsAt timeline item content
This commit is contained in:
parent
b082f59f9c
commit
a7e254cc84
3 changed files with 16 additions and 3 deletions
|
|
@ -107,10 +107,13 @@ data class FailedToParseStateContent(
|
|||
data class LiveLocationContent(
|
||||
val isLive: Boolean,
|
||||
val description: String?,
|
||||
val timestamp: Long,
|
||||
val timeout: Long,
|
||||
val assetType: AssetType?,
|
||||
val locations: List<LiveLocationInfo>,
|
||||
) : EventContent
|
||||
) : EventContent {
|
||||
val endsAt = timestamp + timeout
|
||||
}
|
||||
|
||||
data object LegacyCallInviteContent : EventContent
|
||||
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ class TimelineEventContentMapper(
|
|||
is MsgLikeKind.LiveLocation -> {
|
||||
LiveLocationContent(
|
||||
isLive = kind.content.isLive,
|
||||
timestamp = kind.content.ts.toLong(),
|
||||
description = kind.content.description,
|
||||
timeout = kind.content.timeoutMs.toLong(),
|
||||
assetType = kind.content.assetType.into(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue