Show descriptions for locations.
Descriptions show in the same message bubble above the map in the timeline, and in a bar at the top of the expanded map view.
This commit is contained in:
parent
78a26c034e
commit
83338131fd
8 changed files with 31 additions and 15 deletions
|
|
@ -162,7 +162,7 @@ class DefaultRoomLastMessageFormatterTests {
|
|||
AudioMessageType(body, MediaSource("url"), null),
|
||||
ImageMessageType(body, MediaSource("url"), null),
|
||||
FileMessageType(body, MediaSource("url"), null),
|
||||
LocationMessageType(body, "geo:1,2"),
|
||||
LocationMessageType(body, "geo:1,2", null),
|
||||
NoticeMessageType(body, null),
|
||||
EmoteMessageType(body, null),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ data class ImageMessageType(
|
|||
data class LocationMessageType(
|
||||
val body: String,
|
||||
val geoUri: String,
|
||||
val description: String?,
|
||||
) : MessageType
|
||||
|
||||
data class AudioMessageType(
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class EventMessageMapper {
|
|||
ImageMessageType(type.content.body, type.content.source.map(), type.content.info?.map())
|
||||
}
|
||||
is MessageType.Location -> {
|
||||
LocationMessageType(type.content.body, type.content.geoUri)
|
||||
LocationMessageType(type.content.body, type.content.geoUri, type.content.description)
|
||||
}
|
||||
is MessageType.Notice -> {
|
||||
NoticeMessageType(type.content.body, type.content.formatted?.map())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue