-
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
[#17] 상세화면 (DetailScreen) 구현 #18
Conversation
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.
수고 많으셨습니다. 코멘트롤 몇 개 달아놨는데 간단한 것들은 바로 처리할 수 있으실 거라 생각되구요, 그 외 replace 가능한 것들에 대한 것도 한번 생각해 보세요
@Query("contentId") contentId: String, | ||
@Query("contentTypeId") contentTypeId: String | ||
): ApiResponse<DetailIntroDTO> | ||
/* |
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.
안 쓸 코드는 주석처리 대신에 없애는 게 좋을 거 같아요.
|
||
data class DetailCommonDTO( | ||
val homepage: String, | ||
val overview: String |
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.
trailing comma 를 넣어도 될 거 같습니다
@Query("contentTypeId") contentTypeId: Int | ||
) | ||
*/ | ||
@GET("detailImage1") |
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.
방금 든 생각인데, URL 을 const 로 정의해서 써도 될 거 같습니다
@SerializedName("subfacility") | ||
val subFacility: String?, | ||
@SerializedName("reservationurl") | ||
val reservationUrl: String? |
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.
trailing comma를 넣어도 될 거 같습니다.
그리고 만일의 경우를 대비해 초기값을 넣어도 될 거 같아요
val restDate: String? = null, | ||
val fee: String? = null, | ||
val menus: String? = null, | ||
val place: String? = null |
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.
trailing comma 를 넣어 주는 게 좋을 거 같습니다
.data(detailState.firstImage) | ||
.size(Size.ORIGINAL) | ||
.build(), | ||
colorFilter = if(detailState.firstImage.isNotEmpty()) |
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.
if-else 를 사용할 때 {} 를 적절히 써 주면 가독성에 도움이 될 거 같기도 합니다
val contentTypeId: String = "", | ||
val detailCommon: DetailCommonDTO = DetailCommonDTO("",""), | ||
val detailIntro: CommonDetail = CommonDetail(), | ||
val images: List<DetailImageDTO> = emptyList() |
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.
trailing comma 를 넣어 주는 게 좋을 거 같아요
) | ||
getDetailImage( | ||
detailParcel.contentId, | ||
if(detailParcel.contentTypeId == TYPE_RESTAURANT) |
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.
if - else 에 {} 를 적절히 써 주는 게 좋을 거 같아요
|
||
@Provides | ||
@Singleton | ||
fun provideDetailRepository(detailApi: DetailApi): DetailRepository { |
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.
방금 든 생각인데, 이 부분도 @Binds
를 이용해서 interface 를 리턴할 수 있도록 할 수 있지 않을까 하는 생각이 드네요.
변경사항
동작화면
Screen_recording_20241024_135309.mp4