diff --git a/app/src/main/java/com/wafflestudio/snutt2/model/TagDto.kt b/app/src/main/java/com/wafflestudio/snutt2/model/TagDto.kt index 9cbd5c546..e61ffb1b8 100644 --- a/app/src/main/java/com/wafflestudio/snutt2/model/TagDto.kt +++ b/app/src/main/java/com/wafflestudio/snutt2/model/TagDto.kt @@ -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 } diff --git a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/search/SearchResultList.kt b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/search/SearchResultList.kt index 40f409dc2..102050ecd 100644 --- a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/search/SearchResultList.kt +++ b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/search/SearchResultList.kt @@ -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 = {