File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
app/src/main/java/com/eatssu/android/data/remote/dto/response Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package com.eatssu.android.data.remote.dto.response
33import com.eatssu.android.domain.model.Menu
44import com.google.gson.annotations.SerializedName
55
6+ private const val MENU_SEPARATOR = " , "
7+
68data class GetMealResponse (
79 @SerializedName(" mealId" ) var mealId : Long? = null ,
810 @SerializedName(" price" ) var price : Int? = null ,
@@ -20,7 +22,7 @@ fun List<GetMealResponse>.mapTodayMenuResponseToMenu(): List<Menu> {
2022
2123 this .forEach { mealResponse ->
2224 val menuNames =
23- mealResponse.briefMenus.joinToString(separator = " + " ) { it.name ? : " " }
25+ mealResponse.briefMenus.mapNotNull { it.name }.joinToString(separator = MENU_SEPARATOR )
2426 val mealId = mealResponse.mealId ? : - 1
2527 val price = mealResponse.price ? : 0
2628 val mainRating = mealResponse.rating ? : 0.0
You can’t perform that action at this time.
0 commit comments