Live location : start collecting live location

This commit is contained in:
ganfra 2026-04-03 18:21:37 +02:00
parent a7e254cc84
commit 4e0165458a
8 changed files with 295 additions and 49 deletions

View file

@ -558,17 +558,18 @@ class MessagesFlowNode(
)
}
is TimelineItemLocationContent -> {
val mode = ShowLocationMode.Static(
location = event.content.location,
senderName = event.safeSenderName,
senderId = event.senderId,
senderAvatarUrl = event.senderAvatar.url,
timestamp = event.sentTimeMillis,
assetType = event.content.assetType,
)
NavTarget.LocationViewer(
mode = mode
).takeIf { locationService.isServiceAvailable() }
val mode = when(event.content.mode){
is TimelineItemLocationContent.Mode.Live -> ShowLocationMode.Live
is TimelineItemLocationContent.Mode.Static -> ShowLocationMode.Static(
location = event.content.mode.location,
senderName = event.safeSenderName,
senderId = event.senderId,
senderAvatarUrl = event.senderAvatar.url,
timestamp = event.sentTimeMillis,
assetType = event.content.assetType,
)
}
NavTarget.LocationViewer(mode = mode).takeIf { locationService.isServiceAvailable() }
}
else -> null
}