mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Small optimization
This commit is contained in:
parent
24915591f2
commit
45bd1061d2
1 changed files with 3 additions and 2 deletions
|
@ -223,10 +223,11 @@ class MessageActionsEpoxyController @Inject constructor(
|
||||||
if (!isLocationEvent) return null
|
if (!isLocationEvent) return null
|
||||||
|
|
||||||
val locationContent = clearContent.toModel<MessageLocationContent>(catchError = true)
|
val locationContent = clearContent.toModel<MessageLocationContent>(catchError = true)
|
||||||
val locationUrl = locationContent?.toLocationData()
|
?: return null
|
||||||
|
val locationUrl = locationContent.toLocationData()
|
||||||
?.let { urlMapProvider.buildStaticMapUrl(it, INITIAL_MAP_ZOOM_IN_TIMELINE, 1200, 800) }
|
?.let { urlMapProvider.buildStaticMapUrl(it, INITIAL_MAP_ZOOM_IN_TIMELINE, 1200, 800) }
|
||||||
?: return null
|
?: return null
|
||||||
val locationOwnerId = if (locationContent.isSelfLocation().orTrue()) state.informationData.matrixItem.id else null
|
val locationOwnerId = if (locationContent.isSelfLocation()) state.informationData.matrixItem.id else null
|
||||||
|
|
||||||
return LocationUiData(
|
return LocationUiData(
|
||||||
locationUrl = locationUrl,
|
locationUrl = locationUrl,
|
||||||
|
|
Loading…
Reference in a new issue