Skip to content

Conversation

@devfeijoa
Copy link

@devfeijoa devfeijoa commented Jan 27, 2026

📌𝘐𝘴𝘴𝘶𝘦𝘴

📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯

  • 작품 피드에서 해당 장르에 따라 색상 반영

📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵

Screen_recording_20260128_001553.mp4
Screen_recording_20260128_002659.mp4

로그도 함께 첨부합니다 !
스크린샷 2026-01-27 오후 7 23 59

💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴

현재 relevantCategories에서 값을 가져오고 있는데, 한 장르로 고정된 값이 아니라 장르가 계속 바뀌어서 색상이 다 다르게 나오는 중입니다..
하지만 보시는 바와 같이 두번째 영상은 의도한대로 같은 색상으로 나오고 있습니다 🥲
이해하시기 편하도록 주석을 달아뒀는데 추후에 제거하겠습니다 !

@devfeijoa devfeijoa requested review from m6z1 and s9hn January 27, 2026 15:25
@devfeijoa devfeijoa self-assigned this Jan 27, 2026
@devfeijoa devfeijoa added 🍯 [FEAT] 새로운 기능을 개발합니다. [👸 공주 은영] labels Jan 27, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 27, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

import androidx.databinding.BindingAdapter

@BindingAdapter("app:imageTint")
fun ImageView.setImageTint(@ColorRes colorRes: Int?) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [ktlint] standard:parameter-list-wrapping reported by reviewdog 🐶
Parameter should start on a newline

import androidx.databinding.BindingAdapter

@BindingAdapter("app:imageTint")
fun ImageView.setImageTint(@ColorRes colorRes: Int?) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [ktlint] standard:function-signature reported by reviewdog 🐶
Newline expected after opening parenthesis

import androidx.databinding.BindingAdapter

@BindingAdapter("app:imageTint")
fun ImageView.setImageTint(@ColorRes colorRes: Int?) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [ktlint] standard:parameter-list-wrapping reported by reviewdog 🐶
Missing newline before ")"

import androidx.databinding.BindingAdapter

@BindingAdapter("app:imageTint")
fun ImageView.setImageTint(@ColorRes colorRes: Int?) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [ktlint] standard:function-signature reported by reviewdog 🐶
Newline expected before closing parenthesis

}

@BindingAdapter("app:backgroundTint")
fun View.setBackgroundTint(@ColorRes colorRes: Int?) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [ktlint] standard:parameter-list-wrapping reported by reviewdog 🐶
Parameter should start on a newline

}

@BindingAdapter("app:backgroundTint")
fun View.setBackgroundTint(@ColorRes colorRes: Int?) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [ktlint] standard:function-signature reported by reviewdog 🐶
Newline expected after opening parenthesis

}

@BindingAdapter("app:backgroundTint")
fun View.setBackgroundTint(@ColorRes colorRes: Int?) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [ktlint] standard:parameter-list-wrapping reported by reviewdog 🐶
Missing newline before ")"

}

@BindingAdapter("app:backgroundTint")
fun View.setBackgroundTint(@ColorRes colorRes: Int?) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [ktlint] standard:function-signature reported by reviewdog 🐶
Newline expected before closing parenthesis

)

// 1. 첫번쨰 카테고리를 가져온다
val firstCategory = feed.relevantCategories.first()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r: null 처리가 번거로우시겠지만, 가급적이면 firstOrNull과 같은 safe api를 사용해주세요!
생각보다 non-null api들에서 익셉션이 빈번히 발생합니다!

Comment on lines +29 to +41
// 2. 카테고리가 기타인지 확인한다
val genre = if (firstCategory != "기타") {
firstCategory
// 3. 기타가 아니면 해당하는 장르에 맞는 색상을 반환한다.
} else {
// 두번째 값이 있는지를 확인
if (feed.relevantCategories.size >= 2) {
// 두번째 값이 있으면 해당하는 장르에 맞는 색상을 반환한다.
feed.relevantCategories[1]
} else {
"기타"
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c: 간단하게도 쓸 수 있을 것 같습니다!

Suggested change
// 2. 카테고리가 기타인지 확인한다
val genre = if (firstCategory != "기타") {
firstCategory
// 3. 기타가 아니면 해당하는 장르에 맞는 색상을 반환한다.
} else {
// 두번째 값이 있는지를 확인
if (feed.relevantCategories.size >= 2) {
// 두번째 값이 있으면 해당하는 장르에 맞는 색상을 반환한다.
feed.relevantCategories[1]
} else {
"기타"
}
}
// "기타"가 아닌 첫 번째 장르를 찾고, 없으면(리스트가 비었거나 "기타"뿐이면) "기타"를 반환
val genre = feed.relevantCategories.firstOrNull { it != "기타" } ?: "기타"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[👸 공주 은영] 🍯 [FEAT] 새로운 기능을 개발합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants