-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] 동적 inflate를 위한 chip 관련 구현, BreadTypeList Dto 형태 수정 및 관련 뷰 수정 #227
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
152b9e9
[mod] #224 여러 디자인에 대한 Chip Factory를 만들 수 있도록 수정
Dan2dani aac156f
[mod] #224 sdk 올리기 및 각종 라이브러리 버전 업데이트
Dan2dani f976b4e
[feat] #224 BreadTypeIdDto, NutrientTypeIdDto 같이 공통으로 쓰이는 Dto 분리
Dan2dani ecffe6e
[feat] #224 breadType에 대해 List 형태로 가지고 있는 엔티티 생성
Dan2dani 86095df
[feat] #224 breadType model 형태 수정에 따른 관련 model, entity 형태 수정
Dan2dani 2bdfcc9
[feat] #224 breadType chip 디자인
Dan2dani 3f280a7
[feat] #224 chip inflate에 필요한 각종 확장함수 구현
Dan2dani a504b7c
[mod] #224 breadType이 포함된 뷰 디자인 수정(chip 삭제)
Dan2dani e546acf
[feat] #224 list item마다 chipgroup이 inflate 될 수 읷도록, onBind 함수에서 initC…
Dan2dani 560661d
[feat] #224 마이페이지에 나의 BreadType chip 동적 생성하기
Dan2dani 1c3468c
[feat] #224 나의 저장목록 BreadTypeChips 동적 생성
Dan2dani eb15885
[feat] #224 나의 리뷰 모아보기 BradTypeChips 동적 생성
Dan2dani 0310713
[feat] #224 나의 리뷰 상세보기, 빵집 BreadTypeChips 동적 생성
Dan2dani 47b65cd
[feat] #224 검색 결과 리스트 breadTypeChips 동적 생성
Dan2dani 78c60a0
[feat] #224 리뷰 작성, 빵집 상세뷰 BreadTypsChips 동적 생성
Dan2dani 7a2b76c
[chroe] #224 ktlint 적용
Dan2dani 60ad988
[chroe] #224 ktlint 적용
Dan2dani 9aff4bc
Merge remote-tracking branch 'origin/mod-bradType-chip' into mod-brad…
Dan2dani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/sopt/geonppang/data/model/response/BreadTypeIdDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.sopt.geonppang.data.model.response | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class BreadTypeIdDto( | ||
val breadTypeId: Int | ||
) |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/sopt/geonppang/data/model/response/NutrientTypeIdDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.sopt.geonppang.data.model.response | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class NutrientTypeIdDto( | ||
val nutrientTypeId: Int | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
package com.sopt.geonppang.data.model.response | ||
|
||
import com.sopt.geonppang.domain.model.SelectedFilter | ||
import com.sopt.geonppang.presentation.type.BreadFilterType | ||
import com.sopt.geonppang.presentation.type.NutrientFilterType | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
|
@@ -11,30 +13,24 @@ data class ResponseSettingFilter( | |
) { | ||
@Serializable | ||
data class Data( | ||
val breadTypeList: List<BreadTypeId>, | ||
val breadTypeList: List<BreadTypeIdDto>, | ||
val mainPurpose: String, | ||
val memberId: Int, | ||
val nickname: String, | ||
val nutrientTypeList: List<NutrientTypeId> | ||
) | ||
|
||
@Serializable | ||
data class BreadTypeId( | ||
val breadTypeId: Int | ||
) | ||
|
||
@Serializable | ||
data class NutrientTypeId( | ||
val nutrientTypeId: Int | ||
val nutrientTypeList: List<NutrientTypeIdDto> | ||
) | ||
|
||
fun toSelectedFilter() = SelectedFilter( | ||
mainPurpose = data.mainPurpose, | ||
breadTypeList = data.breadTypeList.map { breadType -> SelectedFilter.BreadTypeId(breadTypeId = breadType.breadTypeId) }, | ||
nutrientTypeList = data.nutrientTypeList.map { nutrientType -> | ||
SelectedFilter.NutrientTypeId( | ||
nutrientTypeId = nutrientType.nutrientTypeId | ||
) | ||
breadTypeList = data.breadTypeList.mapNotNull { breadType -> | ||
BreadFilterType.values().find { | ||
it.id == breadType.breadTypeId | ||
} | ||
}, | ||
Comment on lines
+25
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오 훨씬 좋네용 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. enum으로 바꾸는거 굳이죵 ~~ |
||
nutrientTypeList = data.nutrientTypeList.mapNotNull { nutrientTypeIdDto -> | ||
NutrientFilterType.values().find { | ||
it.id == nutrientTypeIdDto.nutrientTypeId | ||
} | ||
} | ||
) | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
따로 만들어서 관리하니까 확실히 코드가 깔끔해지는군요 짱짱쓰