mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Map sdk timeline item for LiveLocation
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ fun TimelineItemLocationView(
|
||||
lat = content.location.lat,
|
||||
lon = content.location.lon,
|
||||
zoom = 15.0,
|
||||
contentDescription = content.body
|
||||
contentDescription = content.description
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -105,7 +105,6 @@ class TimelineItemContentFactory(
|
||||
}.lastOrNull()
|
||||
if (lastKnownLocation != null) {
|
||||
TimelineItemLocationContent(
|
||||
body = itemContent.body.trimEnd(),
|
||||
description = itemContent.description?.trimEnd(),
|
||||
assetType = itemContent.assetType,
|
||||
senderId = sender,
|
||||
|
||||
-1
@@ -150,7 +150,6 @@ class TimelineItemContentMessageFactory(
|
||||
)
|
||||
} else {
|
||||
TimelineItemLocationContent(
|
||||
body = body,
|
||||
location = location,
|
||||
description = messageType.description,
|
||||
senderId = senderId,
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import io.element.android.libraries.matrix.api.timeline.item.event.getAvatarUrl
|
||||
import io.element.android.libraries.matrix.api.timeline.item.event.getDisplayName
|
||||
|
||||
data class TimelineItemLocationContent(
|
||||
val body: String,
|
||||
val senderId: UserId,
|
||||
val senderProfile: ProfileDetails,
|
||||
val location: Location,
|
||||
|
||||
+2
-2
@@ -24,12 +24,11 @@ open class TimelineItemLocationContentProvider : PreviewParameterProvider<Timeli
|
||||
}
|
||||
|
||||
fun aTimelineItemLocationContent(
|
||||
body: String = "",
|
||||
senderId: UserId = UserId("@sender:matrix.org"),
|
||||
senderProfile: ProfileDetails = aProfileDetailsReady(),
|
||||
description: String? = null,
|
||||
mode: TimelineItemLocationContent.Mode = TimelineItemLocationContent.Mode.Static,
|
||||
) = TimelineItemLocationContent(
|
||||
body = body,
|
||||
location = Location(
|
||||
lat = 52.2445,
|
||||
lon = 0.7186,
|
||||
@@ -37,5 +36,6 @@ fun aTimelineItemLocationContent(
|
||||
),
|
||||
senderId = senderId,
|
||||
senderProfile = senderProfile,
|
||||
description = description,
|
||||
mode = mode
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user