-
Notifications
You must be signed in to change notification settings - Fork 0
[fix] #89: 랜덤 포즈 화면 개선 #93
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 11 commits
548a686
37ed3b6
a067016
1aa076d
863eb49
953ce61
e017a9f
0b8b19c
54bc957
5be4009
3c4426f
388e033
f35d94f
463410f
1084b20
54803f1
d3a2d20
575b6f4
a853151
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| package com.neki.android.core.dataapi.datastore | ||
|
|
||
| import androidx.datastore.preferences.core.booleanPreferencesKey | ||
| import androidx.datastore.preferences.core.stringPreferencesKey | ||
|
|
||
| object DataStoreKey { | ||
| val ACCESS_TOKEN = stringPreferencesKey("access_token") | ||
| val REFRESH_TOKEN = stringPreferencesKey("refresh_token") | ||
| val HAS_VISITED_RANDOM_POSE = booleanPreferencesKey("is_first_visit_random_pose") | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,13 @@ | ||
| package com.neki.android.core.dataapi.repository | ||
|
|
||
| import com.neki.android.core.model.UserInfo | ||
| import kotlinx.coroutines.flow.Flow | ||
|
|
||
| interface UserRepository { | ||
| val hasVisitedRandomPose: Flow<Boolean> | ||
| suspend fun markRandomPoseAsVisited() | ||
|
Member
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. 저 같은 경우에는 온보딩 완료 플래그로 바꾸는 함수명을 #91 (comment) 해당 코멘트에서 말씀해주신 것 처럼 get플래그 : has + pp + 명사, set플래그에 대한 규칙도 정하면 좋을 것 같네요
Contributor
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. setRandomPoseVisited() 이런 식으로 통일하겠습니다! a853151 |
||
| suspend fun getUserInfo(): Result<UserInfo> | ||
| suspend fun updateUserInfo(nickname: String): Result<Unit> | ||
|
|
||
| suspend fun updateProfileImage(mediaId: Long?): Result<Unit> | ||
| } | ||
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.
에러코드에 대한 정의는
ApiException과 동일한 경로인 core:common에 있는게 어떨까요?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.
common에 저 변수를 선언해버리면,
400일 경우 랜덤포즈가 없다,는 내용이 공통적이어야할 것 같다고 생각됩니다.
한 곳으로 모으는 부분에 대해선 찬성이나,
음... common 혹은 network 모듈에 Exception 형태로 하는 건 어떨까요??
저 NO MORE RANDOM POSE 400은 해당 부분에서만 사용하니 냅두고 private 으로 변경한 다음에,
NoMoreRandomPoseException 으로 만들어서 뷰모델에서 참조하면 될 것 같습니다.
Uh oh!
There was an error while loading. Please reload this page.
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.
NetworkModule에 선언한다면 feature에서 core:data 의존성이 없어 viewmodel에서 접근이 안되지 않나요?말씀하신대로 private으로 변경 혹은 제거한 후 아래 코멘트에서 말씀드린 것 처럼 발생 가능한
Exception각각을 정의하고 throw하면error is ClientApiException && error.code == NO_MORE_RANDOM_POSEViewModel에서 현재처럼 NO_MORE_RANDOM_POSE에 접근할 필요가 없게 될 것 같습니다.