Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Next release
- Fix: Display proper size recommendation text

### 2.12.1
- Fix: Memory leak with Virtusize composables
- Fix: Shadow is clipped in compose version of VirtusizeInPageStandard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ internal data class BodyProfileRecommendedSizeParams(
userBodyProfile.weight.toFloatOrNull()?.let { mapOf(PARAM_USER_WEIGHT to it) }
.orEmpty(),
)
.plus(
mapOf(PARAM_USER_AGE to userBodyProfile.age),
)
.plus(
mapOf(PARAM_ITEMS to arrayOf(createItemsParams())),
)
Expand Down Expand Up @@ -98,6 +101,11 @@ internal data class BodyProfileRecommendedSizeParams(
.plus(
mapOf(PARAM_GENDER to userBodyProfile.gender),
)
.plus(
mapOf(
PARAM_STYLE to (storeProduct.storeProductMeta?.additionalInfo?.style ?: "regular"),
),
)
}

/**
Expand Down Expand Up @@ -155,13 +163,15 @@ internal data class BodyProfileRecommendedSizeParams(
const val PARAM_USER_GENDER = "userGender"
const val PARAM_USER_HEIGHT = "userHeight"
const val PARAM_USER_WEIGHT = "userWeight"
const val PARAM_USER_AGE = "userAge"
const val PARAM_EXTERNAL_PRODUCT_ID = "extProductId"

const val PARAM_BRAND = "brand"
const val PARAM_FIT = "fit"
const val PARAM_SIZES = "sizes"
const val PARAM_MODEL_INFO = "modelInfo"
const val PARAM_GENDER = "gender"
const val PARAM_STYLE = "style"

const val PARAM_BODY_MEASUREMENT_VALUE = "value"
const val PARAM_BODY_MEASUREMENT_PREDICTED = "predicted"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ internal class BodyProfileRecommendedSizeParamsTests {
"""
{
"fit": "regular",
"style": "fashionable",
"sizes": {
"38": {
"bust": 660,
Expand Down Expand Up @@ -75,6 +76,7 @@ internal class BodyProfileRecommendedSizeParamsTests {
"""
{
"fit": "regular",
"style": "fashionable",
"sizes": {},
"modelInfo": null,
"gender": "female",
Expand Down Expand Up @@ -390,6 +392,7 @@ internal class BodyProfileRecommendedSizeParamsTests {
"hip" to 85,
"height" to 165,
),
"style" to "fashionable",
),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ internal class VirtusizeApiTest {
"hip" to 85,
"height" to 165,
),
"style" to "fashionable",
),
)
}
Expand Down