Skip to content

Commit

Permalink
TagDto에 toItemKey() 정의
Browse files Browse the repository at this point in the history
  • Loading branch information
plgafhd committed Feb 13, 2025
1 parent ab9bbb1 commit 52b5e84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/com/wafflestudio/snutt2/model/TagDto.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ data class TagDto(
val type: TagType,
val name: String,
) {

companion object {
val TIME_EMPTY: TagDto = TagDto(TagType.TIME, "빈 시간대로 검색")
val TIME_SELECT: TagDto = TagDto(TagType.TIME, "시간대 직접 선택")
val ETC_ENG: TagDto = TagDto(TagType.ETC, "영어진행 강의")
val ETC_MILITARY: TagDto = TagDto(TagType.ETC, "군휴학 원격수업")
}

fun toItemKey(): String = type.toString() + name
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fun SearchResultList(
val keyBoardController = LocalSoftwareKeyboardController.current

Column {
AnimatedLazyRow(itemList = selectedTags, itemKey = { it.type.toString() + it.name }) {
AnimatedLazyRow(itemList = selectedTags, itemKey = { it.toItemKey() }) {
TagCell(
tagDto = it,
onClick = {
Expand Down

0 comments on commit 52b5e84

Please sign in to comment.