Skip to content

Commit

Permalink
Merge pull request #271 from TeamDATEROAD/fix-2nd-QA
Browse files Browse the repository at this point in the history
[fix] 2차 QA사항 반영
  • Loading branch information
t1nm1ksun authored Sep 24, 2024
2 parents b3cfbee + c7a6bc0 commit 21cb258
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fun Enroll.toTimelineData(): RequestTimelineDto = RequestTimelineDto(
tags = this.tags.map { tag -> tag.toData() },
country = this.country?.title.orEmpty(),
city = this.city.toAreaTitle(),
places = places.mapIndexed { index, place -> place.toData(sequence = index) }
places = places.mapIndexed { index, place -> place.toData(sequence = index + 1) }
)

fun Enroll.toCourseData(): RequestCourseDto = RequestCourseDto(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class CourseRepositoryImpl @Inject constructor(
courseRemoteDataSource.postCourse(
images = enroll.images.map { image -> ContentUriRequestBody(contentResolver = contentResolver, uri = Uri.parse(image)).toFormData() },
course = Json.encodeToString(enroll.toCourseData()).toRequestBody("application/json".toMediaType()),
places = Json.encodeToString(enroll.places.mapIndexed { index, place -> place.toData(sequence = index) }).toRequestBody("application/json".toMediaType()),
places = Json.encodeToString(enroll.places.mapIndexed { index, place -> place.toData(sequence = index + 1) }).toRequestBody("application/json".toMediaType()),
tags = Json.encodeToString(enroll.tags.map { tag -> tag.toData() }).toRequestBody("application/json".toMediaType())
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.sopt.dateroad.presentation.ui.component.view

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
Expand All @@ -18,6 +19,7 @@ import com.airbnb.lottie.compose.rememberLottieComposition
import org.sopt.dateroad.presentation.util.LoadingView.CLIPMAX
import org.sopt.dateroad.presentation.util.LoadingView.CLIPMIN
import org.sopt.dateroad.presentation.util.LoadingView.LOTTIE
import org.sopt.dateroad.ui.theme.DateRoadTheme

@Composable
fun DateRoadLoadingView() {
Expand All @@ -36,7 +38,7 @@ fun DateRoadLoadingView() {
}

Box(
modifier = Modifier.fillMaxSize(),
modifier = Modifier.fillMaxSize().background(color = DateRoadTheme.colors.white),
contentAlignment = Alignment.Center
) {
LottieAnimation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ fun EnrollRoute(
onCostValueChange = { cost -> viewModel.setEvent(EnrollContract.EnrollEvent.OnCostValueChange(cost = cost)) },
onEnrollSuccessDialogButtonClick = {
viewModel.setSideEffect(EnrollContract.EnrollSideEffect.PopBackStack)
viewModel.setEvent(EnrollContract.EnrollEvent.SetIsEnrollSuccessDialogOpen(isEnrollSuccessDialogOpen = false))
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ fun ProfileRoute(
}

ProfileType.EDIT -> {
if (uiState.currentProfile.toEditProfile() != uiState.editProfile || uiState.nicknameValidateResult == TextFieldValidateResult.Success && (uiState.editProfile.tags.isNotEmpty())) {
if ((uiState.editProfile.tags.isNotEmpty()) && uiState.currentProfile.toEditProfile() != uiState.editProfile || uiState.nicknameValidateResult == TextFieldValidateResult.Success) {
viewModel.setEvent(ProfileContract.ProfileEvent.CheckEnrollButtonEnable(true))
} else {
viewModel.setEvent(ProfileContract.ProfileEvent.CheckEnrollButtonEnable(false))
Expand Down

0 comments on commit 21cb258

Please sign in to comment.