From c3336742a0d5bf01c9cdb31c4e28e619915e53e8 Mon Sep 17 00:00:00 2001 From: KaylaBrady <31781298+KaylaBrady@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:55:03 -0500 Subject: [PATCH] fix(StopDetailsViewModel): Reliably merge in new predictions --- .../mbta_app/android/stopDetails/StopDetailsViewModel.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsViewModel.kt b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsViewModel.kt index 9867f311d..0678c6763 100644 --- a/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsViewModel.kt +++ b/androidApp/src/main/java/com/mbta/tid/mbta_app/android/stopDetails/StopDetailsViewModel.kt @@ -68,13 +68,13 @@ class StopDetailsViewModel( StopData( it.stopId, it.schedules, - it.predictionsByStop - ?: PredictionsByStopJoinResponse( + (it.predictionsByStop + ?: PredictionsByStopJoinResponse( mapOf(it.stopId to message.predictions), message.trips, message.vehicles - ) - .mergePredictions(message) + )) + .mergePredictions(message) ) } }