Create a const value for the height of message location item
This commit is contained in:
parent
46700723a8
commit
4c07405220
@ -54,7 +54,7 @@ class LiveLocationMessageItemFactory @Inject constructor(
|
|||||||
attributes: AbsMessageItem.Attributes,
|
attributes: AbsMessageItem.Attributes,
|
||||||
): MessageLiveLocationStartItem {
|
): MessageLiveLocationStartItem {
|
||||||
val width = timelineMediaSizeProvider.getMaxSize().first
|
val width = timelineMediaSizeProvider.getMaxSize().first
|
||||||
val height = dimensionConverter.dpToPx(200)
|
val height = dimensionConverter.dpToPx(MessageItemFactory.MESSAGE_LOCATION_ITEM_HEIGHT_IN_DP)
|
||||||
|
|
||||||
return MessageLiveLocationStartItem_()
|
return MessageLiveLocationStartItem_()
|
||||||
.attributes(attributes)
|
.attributes(attributes)
|
||||||
|
@ -229,7 +229,7 @@ class MessageItemFactory @Inject constructor(
|
|||||||
attributes: AbsMessageItem.Attributes,
|
attributes: AbsMessageItem.Attributes,
|
||||||
): MessageLocationItem? {
|
): MessageLocationItem? {
|
||||||
val width = timelineMediaSizeProvider.getMaxSize().first
|
val width = timelineMediaSizeProvider.getMaxSize().first
|
||||||
val height = dimensionConverter.dpToPx(200)
|
val height = dimensionConverter.dpToPx(MESSAGE_LOCATION_ITEM_HEIGHT_IN_DP)
|
||||||
|
|
||||||
val locationUrl = locationContent.toLocationData()?.let {
|
val locationUrl = locationContent.toLocationData()?.let {
|
||||||
urlMapProvider.buildStaticMapUrl(it, INITIAL_MAP_ZOOM_IN_TIMELINE, width, height)
|
urlMapProvider.buildStaticMapUrl(it, INITIAL_MAP_ZOOM_IN_TIMELINE, width, height)
|
||||||
@ -777,5 +777,6 @@ class MessageItemFactory @Inject constructor(
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val MAX_NUMBER_OF_EMOJI_FOR_BIG_FONT = 5
|
private const val MAX_NUMBER_OF_EMOJI_FOR_BIG_FONT = 5
|
||||||
|
const val MESSAGE_LOCATION_ITEM_HEIGHT_IN_DP = 200
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user