mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Live location : format the endsAt timeline item content
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
|
||||
+1
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user