Skip to content

Commit 242f5ab

Browse files
committed
Merge remote-tracking branch 'origin/release' into develop
2 parents 87dc523 + 2259198 commit 242f5ab

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

build-logic/src/main/kotlin/Configuration.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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"

feature/travel/src/main/java/com/yapp/ndgl/feature/travel/traveldetail/TravelDetailViewModel.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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
)

0 commit comments

Comments
 (0)