Enable navigation only from running state item

This commit is contained in:
Maxime NATUREL 2022-05-17 11:07:21 +02:00
parent 23e8cad10f
commit 4864980a5a
2 changed files with 4 additions and 3 deletions

View File

@ -2024,7 +2024,6 @@ class TimelineFragment @Inject constructor(
handleShowLocationPreview(messageContent, informationData.senderId) handleShowLocationPreview(messageContent, informationData.senderId)
} }
is MessageBeaconInfoContent -> { is MessageBeaconInfoContent -> {
// TODO navigate only from running live location message: possible after merge of associated PR
navigateToLocationLiveMap() navigateToLocationLiveMap()
} }
else -> { else -> {

View File

@ -75,7 +75,8 @@ class LiveLocationShareMessageItemFactory @Inject constructor(
val height = dimensionConverter.dpToPx(MessageItemFactory.MESSAGE_LOCATION_ITEM_HEIGHT_IN_DP) val height = dimensionConverter.dpToPx(MessageItemFactory.MESSAGE_LOCATION_ITEM_HEIGHT_IN_DP)
return MessageLiveLocationInactiveItem_() return MessageLiveLocationInactiveItem_()
.attributes(attributes) // disable the click on this state item
.attributes(attributes.copy(itemClickListener = null))
.mapWidth(width) .mapWidth(width)
.mapHeight(height) .mapHeight(height)
.highlighted(highlight) .highlighted(highlight)
@ -90,7 +91,8 @@ class LiveLocationShareMessageItemFactory @Inject constructor(
val height = dimensionConverter.dpToPx(MessageItemFactory.MESSAGE_LOCATION_ITEM_HEIGHT_IN_DP) val height = dimensionConverter.dpToPx(MessageItemFactory.MESSAGE_LOCATION_ITEM_HEIGHT_IN_DP)
return MessageLiveLocationStartItem_() return MessageLiveLocationStartItem_()
.attributes(attributes) // disable the click on this state item
.attributes(attributes.copy(itemClickListener = null))
.mapWidth(width) .mapWidth(width)
.mapHeight(height) .mapHeight(height)
.highlighted(highlight) .highlighted(highlight)