-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/#5 mypage screen구현 #36
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
The head ref may contain hidden characters: "feat/#5-mypage-screen\uAD6C\uD604"
Changes from all commits
138c5f0
12901b2
43b9fb7
01e570e
db101e2
1c5a7fd
02512d5
9e85d40
b4190af
985250a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -60,7 +60,12 @@ enum class StudyTheme( | |||||||||||||||||||||||||||||||||
| PROJECT("프로젝트"), | ||||||||||||||||||||||||||||||||||
| COMPETITION("공모전"), | ||||||||||||||||||||||||||||||||||
| MAJOR_CAREER("전공 / 진로 학습"), | ||||||||||||||||||||||||||||||||||
| OTHER("기타") | ||||||||||||||||||||||||||||||||||
| OTHER("기타"); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| companion object { | ||||||||||||||||||||||||||||||||||
| fun from(value: String): StudyTheme? = | ||||||||||||||||||||||||||||||||||
| values().firstOrNull { it.name == value } | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+63
to
+68
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. 🧩 Analysis chain🏁 Script executed: # Find and read the Global.kt file
fd "Global.kt" --type fRepository: SPOTeam/Android-V2 Length of output: 119 🏁 Script executed: # Also get size to determine how to read
wc -l core/model/src/main/java/com/umcspot/spot/model/Global.ktRepository: SPOTeam/Android-V2 Length of output: 123 🏁 Script executed: cat -n core/model/src/main/java/com/umcspot/spot/model/Global.ktRepository: SPOTeam/Android-V2 Length of output: 3038 🏁 Script executed: # Search for usages of StudyTheme.from
rg "StudyTheme\.from" --type kt -B 2 -A 2Repository: SPOTeam/Android-V2 Length of output: 88 🏁 Script executed: # Search for API models and responses that might use StudyTheme
rg "StudyTheme" --type kt -lRepository: SPOTeam/Android-V2 Length of output: 88 🏁 Script executed: # Search for StudyTheme.from usages without type filter
rg "StudyTheme\.from" -B 2 -A 2Repository: SPOTeam/Android-V2 Length of output: 614 🏁 Script executed: # Search for all StudyTheme references to understand usage patterns
rg "StudyTheme" --include="*.kt" -lRepository: SPOTeam/Android-V2 Length of output: 503 🏁 Script executed: # Search for all StudyTheme references
rg "StudyTheme"Repository: SPOTeam/Android-V2 Length of output: 13899 🏁 Script executed: # Find UserPreferredCategoryResponseDto to see API contract
rg "UserPreferredCategoryResponseDto" -B 5 -A 10Repository: SPOTeam/Android-V2 Length of output: 12643 🏁 Script executed: # Search for test files related to UserPreferredCategoryResponseDto or StudyTheme conversion
find . -name "*Test.kt" -o -name "*test.kt" | head -20Repository: SPOTeam/Android-V2 Length of output: 188 🏁 Script executed: # Search for test data or fixtures showing API response format
rg "UserPreferredCategoryResponseDto\|categories.*=" -A 3 -B 1Repository: SPOTeam/Android-V2 Length of output: 44 🏁 Script executed: # Search for API response examples or mock data
rg "categories.*LANGUAGE\|categories.*Language\|categories.*language" -B 2 -A 2Repository: SPOTeam/Android-V2 Length of output: 44 🏁 Script executed: # Check how other enums handle from() conversions
rg "fun from\(" --include="*.kt" -B 2 -A 5Repository: SPOTeam/Android-V2 Length of output: 503 🏁 Script executed: # Search for from() function patterns in all files
rg "fun from\(" -B 2 -A 5Repository: SPOTeam/Android-V2 Length of output: 1377 🏁 Script executed: # Let's check the actual API response DTO more carefully
cat -n data/user/src/main/java/com/umcspot/spot/user/dto/response/UserPreferredCategoryResponseDto.ktRepository: SPOTeam/Android-V2 Length of output: 551 StudyTheme.from() 매핑 방식을 SocialLoginType.from() 패턴과 일관성 있게 정정하세요. 현재 enum 🔧 매핑 범위 확장 예시 companion object {
fun from(value: String): StudyTheme? =
values().firstOrNull { it.name == value }
} companion object {
fun from(value: String): StudyTheme? {
val normalized = value.trim()
return values().firstOrNull {
it.name.equals(normalized, ignoreCase = true) || it.title == normalized
}
}
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| enum class StudyStyle { | ||||||||||||||||||||||||||||||||||
|
|
@@ -88,5 +93,15 @@ enum class SocialLoginType( | |||||||||||||||||||||||||||||||||
| val title: String | ||||||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||||||
| KAKAO("kakao"), | ||||||||||||||||||||||||||||||||||
| NAVER("naver"), | ||||||||||||||||||||||||||||||||||
| NAVER("naver"); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| companion object { | ||||||||||||||||||||||||||||||||||
| fun from(value: String): SocialLoginType { | ||||||||||||||||||||||||||||||||||
| val normalized = value.lowercase() | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| return values().firstOrNull { | ||||||||||||||||||||||||||||||||||
| it.title == normalized | ||||||||||||||||||||||||||||||||||
| } ?: KAKAO | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+98
to
+105
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. 🧩 Analysis chain🏁 Script executed: fd "Global.kt" --type fRepository: SPOTeam/Android-V2 Length of output: 119 🏁 Script executed: cat -n core/model/src/main/java/com/umcspot/spot/model/Global.kt | head -120Repository: SPOTeam/Android-V2 Length of output: 3038 🏁 Script executed: rg "SocialLoginType\.from\(" --type kotlin --type java -B 2 -A 2Repository: SPOTeam/Android-V2 Length of output: 632 🏁 Script executed: rg "SocialLoginType" --type kotlin --type java | head -30Repository: SPOTeam/Android-V2 Length of output: 3859 🏁 Script executed: rg "\.from\(" core/model/src/main/java/com/umcspot/spot/model/Global.kt -A 10 -B 2Repository: SPOTeam/Android-V2 Length of output: 44 🏁 Script executed: cat -n data/user/src/main/java/com/umcspot/spot/user/mapper/UserMapper.kt | head -50Repository: SPOTeam/Android-V2 Length of output: 2350 알 수 없는 로그인 타입을 KAKAO로 기본 처리하면 오분류됩니다. 신규/오타 값이 들어오면 잘못된 타입으로 저장될 수 있습니다. 🔧 안전한 기본값/로케일 처리 예시+import java.util.Locale
enum class SocialLoginType(
val title: String
) {
+ UNKNOWN("unknown"),
KAKAO("kakao"),
NAVER("naver");
companion object {
fun from(value: String): SocialLoginType {
- val normalized = value.lowercase()
+ val normalized = value.lowercase(Locale.ROOT)
return values().firstOrNull {
it.title == normalized
- } ?: KAKAO
+ } ?: UNKNOWN
}
}
}🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| package com.umcspot.spot.user.dto.response | ||
|
|
||
| import android.annotation.SuppressLint | ||
| import com.umcspot.spot.model.ImageRef | ||
| import com.umcspot.spot.model.WeatherType | ||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @SuppressLint("UnsafeOptInUsageError") | ||
| @Serializable | ||
| data class MyPageResponseDto( | ||
| @SerialName("memberId") | ||
| val memberId : Long, | ||
| @SerialName("nickname") | ||
| val nickname : String, | ||
| @SerialName("profileImageUrl") | ||
| val profileImageUrl : String?, | ||
| @SerialName("loginType") | ||
| val loginType : String, | ||
| @SerialName("email") | ||
| val email : String, | ||
| @SerialName("studyParticipationInfo") | ||
| val studyParticipationInfo : StudyParticipationInfo, | ||
| ) | ||
|
|
||
| @SuppressLint("UnsafeOptInUsageError") | ||
| @Serializable | ||
| data class StudyParticipationInfo( | ||
| @SerialName("participatingStudyCount") | ||
| val participatingStudyCount : Int, | ||
| @SerialName("recruitingStudyCount") | ||
| val recruitingStudyCount : Int, | ||
| @SerialName("appliedStudyCount") | ||
| val appliedStudyCount : Int | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.umcspot.spot.user.dto.response | ||
|
|
||
| import android.annotation.SuppressLint | ||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @SuppressLint("UnsafeOptInUsageError") | ||
| @Serializable | ||
| data class UserPreferredCategoryResponseDto( | ||
| @SerialName("categories") | ||
| val categories: List<String>, | ||
|
|
||
| @SerialName("totalCount") | ||
| val totalCount: Int | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.umcspot.spot.user.model | ||
|
|
||
| import com.umcspot.spot.model.ImageRef | ||
| import com.umcspot.spot.model.SocialLoginType | ||
|
|
||
| data class MyPageResult( | ||
| val memberId: Long, | ||
| val nickname: String, | ||
| val profileImageUrl: ImageRef, | ||
| val loginType: SocialLoginType, | ||
| val email: String, | ||
| val participateCount: Int, | ||
| val recruitingCount: Int, | ||
| val appliedCount: Int | ||
| ) |
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.
🧩 Analysis chain
🏁 Script executed:
Repository: SPOTeam/Android-V2
Length of output: 134
🏁 Script executed:
Repository: SPOTeam/Android-V2
Length of output: 1662
🏁 Script executed:
Repository: SPOTeam/Android-V2
Length of output: 794
🏁 Script executed:
Repository: SPOTeam/Android-V2
Length of output: 2273
🏁 Script executed:
# Read the full Location.kt file to see the complete LocationRow definition and any extensions cat -n ./core/common/src/main/java/com/umcspot/spot/common/location/Location.ktRepository: SPOTeam/Android-V2
Length of output: 3564
🏁 Script executed:
Repository: SPOTeam/Android-V2
Length of output: 4301
🏁 Script executed:
Repository: SPOTeam/Android-V2
Length of output: 3296
🏁 Script executed:
Repository: SPOTeam/Android-V2
Length of output: 1199
🏁 Script executed:
Repository: SPOTeam/Android-V2
Length of output: 1645
🏁 Script executed:
Repository: SPOTeam/Android-V2
Length of output: 44
🏁 Script executed:
# Check the full UserRepositoryImpl.kt file for any usage of mapRegionCodesToFullNames wc -l ./data/user/src/main/java/com/umcspot/spot/user/repositoryimpl/UserRepositoryImpl.ktRepository: SPOTeam/Android-V2
Length of output: 149
🏁 Script executed:
# Read the full file cat -n ./data/user/src/main/java/com/umcspot/spot/user/repositoryimpl/UserRepositoryImpl.ktRepository: SPOTeam/Android-V2
Length of output: 4086
mapNotNull로 인해 존재하지 않는 코드가 자동으로 필터링됩니다.입력
regionCodes에 포함된 코드가locations에 없으면 결과에서 제외되어 길이 불일치가 발생할 수 있습니다. UI가 동일 길이를 기대하거나 데이터 무결성이 중요하다면 누락된 코드를 보존하는 방식이 더 안전합니다.길이 보존 예시
🤖 Prompt for AI Agents