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)
}
is MessageBeaconInfoContent -> {
// TODO navigate only from running live location message: possible after merge of associated PR
navigateToLocationLiveMap()
}
else -> {

View file

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