-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 마이페이지 - 캐릭터 관리 UI 구현(#13) #31
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
Changes from all commits
edc052c
7942ab7
03d6a49
2939e99
0b42474
7d1ece1
08ebaed
5041597
0be3423
5b0f740
484a244
4b36275
20eb19f
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 |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| package kr.co.call.data.repositoryImpl | ||
|
|
||
| import kr.co.call.domain.model.mypage.AiCharacter | ||
| import kr.co.call.domain.repository.AICharacterRepository | ||
| import javax.inject.Inject | ||
|
|
||
| // TODO: API 연동 전 임시 구현체 | ||
| class AICharacterRepositoryImpl @Inject constructor() : AICharacterRepository { | ||
|
|
||
| private val aiCharacters = mutableListOf( | ||
| AiCharacter( | ||
| id = "1", name = "김민준", profileImageUrl = "", isMain = true, | ||
| createdAtLabel = "2025.05.26", daysTogetherLabel = "35일 째", lastConversationLabel = "오늘 21:42", | ||
| summary = "아이스크림을 커피보다 좋아하며, 늦은 저녁 시간에 대화하는 것을 선호해요. 디자인과 여행 이야기에 관심이 많고, 반말대를 편하게 여겨요.", | ||
| ), | ||
| AiCharacter( | ||
| id = "2", name = "박동휘", profileImageUrl = "", isMain = false, | ||
| createdAtLabel = "2025.06.19", daysTogetherLabel = "11일 째", lastConversationLabel = "6/29 12:30", | ||
| summary = "운동과 액티비티를 좋아하고, 아침 시간대 대화를 선호해요.", | ||
| ), | ||
| AiCharacter( | ||
| id = "3", name = "정유나", profileImageUrl = "", isMain = false, | ||
| createdAtLabel = "2025.06.25", daysTogetherLabel = "5일 째", lastConversationLabel = "6/28 09:04", | ||
| summary = "잔잔한 음악과 독서를 좋아하고, 차분한 대화를 선호해요.", | ||
| ), | ||
| ) | ||
|
|
||
| override suspend fun getCharacters(): Result<List<AiCharacter>>{ | ||
| return runCatching { | ||
| aiCharacters.toList() | ||
| } | ||
| } | ||
|
|
||
| override suspend fun deleteCharacter(characterId: String): Result<Unit> { | ||
| return runCatching { | ||
| aiCharacters.removeAll { it.id == characterId } | ||
| Unit | ||
| } | ||
| } | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| override suspend fun canAddCharacter(): Result<Boolean> { | ||
| // TODO: 마지막 캐릭터 생성 시각 기준 24시간 경과 여부를 판단(백엔드) | ||
| return runCatching { false } | ||
|
Comment on lines
+41
to
+43
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. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n -C 5 \
'canAddCharacter|NavigateToAddCharacter|ShowAddCharacterBlocked' \
core/data featureRepository: call-from-ai/CallFromAi_Android Length of output: 6747 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
echo "== repository interface/call sites =="
rg -n -C 3 'fun canAddCharacter\(|suspend fun canAddCharacter|canAddCharacter' --glob '*.kt' .
echo "== repository provider/binding snippets =="
rg -n -C 4 'AICharacterRepository|AIC|RepositoryImpl|Hilt|Provides|Inject' --glob '*.kt' . | sed -n '1,220p'
echo "== module/build dependency hints =="
fd 'build.gradle|build.gradle.kts|settings.gradle|settings.gradle.kts' . -t f -x sh -c 'echo "--- $1"; cat "$1"' sh {}Repository: call-from-ai/CallFromAi_Android Length of output: 44761 캐릭터 추가 eligibility 판정한 뒤 반환하도록 수정하세요.
🤖 Prompt for AI Agents |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ import kr.co.call.designsystem.theme.CallTheme | |
| internal fun PopupCard( | ||
| modifier: Modifier = Modifier, | ||
| label: String, | ||
| title: String, | ||
| title: String?, | ||
| description: AnnotatedString? = null, | ||
| labelSpacerHeight: Dp = 8.dp, | ||
| descriptionSpacerHeight: Dp = 8.dp, | ||
|
|
@@ -59,13 +59,16 @@ internal fun PopupCard( | |
| textAlign = TextAlign.Center, | ||
| ) | ||
| Spacer(modifier = Modifier.height(labelSpacerHeight)) | ||
| Text( | ||
| text = title, | ||
| style = CallTheme.typography.bodyLargeBold, | ||
| color = CallTheme.colors.black, | ||
| textAlign = TextAlign.Center, | ||
| modifier = Modifier.fillMaxWidth(), | ||
| ) | ||
| if (title != null) { | ||
| Spacer(modifier = Modifier.height(labelSpacerHeight)) | ||
| Text( | ||
| text = title, | ||
| style = CallTheme.typography.bodyLargeBold, | ||
| color = CallTheme.colors.black, | ||
| textAlign = TextAlign.Center, | ||
| modifier = Modifier.fillMaxWidth(), | ||
| ) | ||
| } | ||
|
Comment on lines
33
to
+71
Collaborator
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. 이거 수정한 이유 있나영?
Collaborator
Author
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.
Collaborator
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. 이 코멘트 와 동일합니다! |
||
| if (description != null) { | ||
| Spacer(modifier = Modifier.height(descriptionSpacerHeight)) | ||
| Text( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="40dp" | ||
| android:height="40dp" | ||
| android:viewportWidth="40" | ||
| android:viewportHeight="40"> | ||
| <path | ||
| android:pathData="M20,1.5L20,1.5A18.5,18.5 0,0 1,38.5 20L38.5,20A18.5,18.5 0,0 1,20 38.5L20,38.5A18.5,18.5 0,0 1,1.5 20L1.5,20A18.5,18.5 0,0 1,20 1.5z" | ||
| android:fillColor="#FFDCE2"/> | ||
| <path | ||
| android:pathData="M20,1.5L20,1.5A18.5,18.5 0,0 1,38.5 20L38.5,20A18.5,18.5 0,0 1,20 38.5L20,38.5A18.5,18.5 0,0 1,1.5 20L1.5,20A18.5,18.5 0,0 1,20 1.5z" | ||
| android:strokeWidth="3" | ||
| android:fillColor="#00000000" | ||
| android:strokeColor="#FFFCFC"/> | ||
| <path | ||
| android:pathData="M12,28.026L16.607,26.273C16.902,26.16 17.049,26.104 17.187,26.031C17.31,25.966 17.427,25.89 17.537,25.806C17.66,25.71 17.772,25.599 17.996,25.377L27.382,16.058C28.301,15.145 28.306,13.66 27.393,12.741C26.481,11.822 24.996,11.817 24.077,12.729L14.691,22.049C14.467,22.271 14.356,22.382 14.259,22.505C14.174,22.615 14.098,22.731 14.032,22.853C13.957,22.99 13.9,23.137 13.786,23.431L12,28.026ZM12,28.026L13.722,23.595C13.845,23.278 13.907,23.12 14.012,23.047C14.104,22.984 14.217,22.961 14.326,22.982C14.452,23.006 14.571,23.127 14.811,23.368L16.678,25.248C16.917,25.489 17.037,25.61 17.061,25.735C17.081,25.845 17.057,25.958 16.993,26.049C16.92,26.154 16.761,26.214 16.443,26.335L12,28.026Z" | ||
| android:strokeLineJoin="round" | ||
| android:strokeWidth="2" | ||
| android:fillColor="#00000000" | ||
| android:strokeColor="#FF8AAF" | ||
| android:strokeLineCap="round"/> | ||
| </vector> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="24dp" | ||
| android:height="24dp" | ||
| android:viewportWidth="24" | ||
| android:viewportHeight="24"> | ||
| <path | ||
| android:pathData="M9,3.5L9.6,2.4C9.783,2.062 10.135,1.85 10.519,1.85H13.481C13.865,1.85 14.217,2.062 14.4,2.4L15,3.5H19C19.414,3.5 19.75,3.836 19.75,4.25C19.75,4.664 19.414,5 19,5H5C4.586,5 4.25,4.664 4.25,4.25C4.25,3.836 4.586,3.5 5,3.5H9Z" | ||
| android:fillColor="#FFFFFF"/> | ||
| <path | ||
| android:pathData="M5.7,7H18.3L17.53,19.19C17.443,20.6 16.273,21.7 14.859,21.7H9.141C7.727,21.7 6.557,20.6 6.47,19.19L5.7,7Z" | ||
| android:fillColor="#00000000" | ||
| android:strokeColor="#FFFFFF" | ||
| android:strokeWidth="1.5" | ||
| android:strokeLineJoin="round"/> | ||
| <path | ||
| android:pathData="M9.75,10.5V18" | ||
| android:strokeColor="#FFFFFF" | ||
| android:strokeWidth="1.5" | ||
| android:strokeLineCap="round"/> | ||
| <path | ||
| android:pathData="M14.25,10.5V18" | ||
| android:strokeColor="#FFFFFF" | ||
| android:strokeWidth="1.5" | ||
| android:strokeLineCap="round"/> | ||
| </vector> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package kr.co.call.domain.model.mypage | ||
|
|
||
| data class AiCharacter( | ||
| val id: String= "", | ||
| val name: String= "", | ||
| val profileImageUrl: String= "", | ||
| val isMain: Boolean, | ||
| val createdAtLabel: String= "", | ||
| val daysTogetherLabel: String= "", | ||
| val lastConversationLabel: String= "", | ||
| val summary: String= "", | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package kr.co.call.domain.repository | ||
|
|
||
| import kr.co.call.domain.model.mypage.AiCharacter | ||
|
|
||
| interface AICharacterRepository { | ||
| suspend fun getCharacters(): Result<List<AiCharacter>> | ||
| suspend fun deleteCharacter(characterId: String): Result<Unit> | ||
| suspend fun canAddCharacter(): Result<Boolean> | ||
| } |


Uh oh!
There was an error while loading. Please reload this page.