mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix(nav): restore broken traceroute map navigation (#5104)
This commit is contained in:
parent
35bf1fded5
commit
39620d063b
6 changed files with 71 additions and 6 deletions
|
|
@ -277,7 +277,6 @@ open class MetricsViewModel(
|
|||
responseLogUuid: String,
|
||||
overlay: TracerouteOverlay?,
|
||||
onViewOnMap: (Int, String) -> Unit,
|
||||
onShowError: (StringResource) -> Unit,
|
||||
) {
|
||||
viewModelScope.launch {
|
||||
val snapshotPositions = tracerouteSnapshotRepository.getSnapshotPositions(responseLogUuid).first()
|
||||
|
|
@ -300,7 +299,11 @@ open class MetricsViewModel(
|
|||
)
|
||||
val errorRes = availability.toMessageRes()
|
||||
if (errorRes != null) {
|
||||
onShowError(errorRes)
|
||||
// Post the error alert after the current alert is dismissed to avoid
|
||||
// the wrapping dismissAlert() in AlertManager immediately clearing it.
|
||||
viewModelScope.launch {
|
||||
alertManager.showAlert(titleRes = Res.string.traceroute, messageRes = errorRes)
|
||||
}
|
||||
} else {
|
||||
onViewOnMap(requestId, responseLogUuid)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -361,7 +361,6 @@ private fun showTracerouteDetail(
|
|||
responseLogUuid = result.uuid,
|
||||
overlay = overlay,
|
||||
onViewOnMap = onViewOnMap,
|
||||
onShowError = {},
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue