File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
build-logic/src/main/kotlin
feature/travel/src/main/java/com/yapp/ndgl/feature/travel/traveldetail Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ object Configuration {
55 const val COMPILE_SDK = 36
66 const val TARGET_SDK = 36
77
8- const val VERSION_CODE = 3
9- const val VERSION_NAME = " 1.0.2 "
8+ const val VERSION_CODE = 4
9+ const val VERSION_NAME = " 1.0.3 "
1010
1111 val JAVA_VERSION = JavaVersion .VERSION_17
1212 const val JVM_TARGET = " 17"
Original file line number Diff line number Diff line change @@ -980,7 +980,9 @@ class TravelDetailViewModel @AssistedInject constructor(
980980 private fun List<Itinerary>.toUpdateItems (): List <ItineraryUpdateItem > {
981981 return this .flatMapIndexed { dayIndex, itinerary ->
982982 val day = dayIndex + 1
983- itinerary.places.map { place ->
983+ itinerary.places.mapIndexed { index, place ->
984+ val prevPlace = itinerary.places.getOrNull(index - 1 )
985+
984986 ItineraryUpdateItem (
985987 googlePlaceId = place.placeInfo.googlePlaceId,
986988 day = day,
@@ -989,8 +991,8 @@ class TravelDetailViewModel @AssistedInject constructor(
989991 estimatedDuration = place.userData.estimatedDuration.inWholeMinutes.toInt(),
990992 memo = place.userData.memo,
991993 cost = place.userData.cost,
992- distanceKm = place .transportToNext?.distanceKm, // 지난번 만든 프로퍼티 활용
993- transportation = place .transportToNext?.let {
994+ distanceKm = prevPlace? .transportToNext?.distanceKm,
995+ transportation = prevPlace? .transportToNext?.let {
994996 listOf (it.toTransportationItem())
995997 },
996998 )
You can’t perform that action at this time.
0 commit comments