Skip to content
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

[REFACTOR] entity 추가, dataStore 추가 #99

Merged
merged 25 commits into from
Oct 4, 2023

Conversation

gaeun5744
Copy link
Contributor

✍️ 작업한 내용

  • Dto -> entity로 변환
  • DataStore 구현 완료
  • DataStore DI 적용
  • KakaoAuthService DI 적용
  • Token useCase 추가

✔️ PR point

  • 한꺼번에 PR 올립니다

📸 스크린샷

🍀 관련 이슈

Copy link
Contributor

@amourxyoung amourxyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👊

@@ -12,7 +13,7 @@ data class ResponseDetailRetroDto(
@SerialName("message")
val message: String,
@SerialName("data")
val data: Data?,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


class KakaoLoginService(private val context: Context) {
class KakaoAuthService @Inject constructor(@ActivityContext private val context: Context) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

멋있다 그때는 왜 안됐었던것이죠 ?!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KakaoAuthService → LoginViewModel → LoginActivity 순으로 주입되고, kakaoAuthService에는
@ApplicationContext private val context: Context` 가 파라미터로 들어가 있는 코드를 처음에 작성했는데,,

Hilt의 ViewModel 주입은 Activity의 생명주기와 분리되어야 하기 때문에, ViewModel에서는 Activity Context를 직접 참조하거나 주입받아서는 안 된다고 합니다...! 이 원칙에 위반해서 안되던거더라구요,,,,,

@@ -25,15 +26,15 @@ class DetailRetroAdapter() :

inner class DetailRetroViewHolder(private val binding: ItemDetailRetroBinding) :
RecyclerView.ViewHolder(binding.root) {
fun onBind(item: ResponseDetailRetroDto.Data.DetailReviewData.Content) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최고당 진짜 🔥

@gaeun5744 gaeun5744 merged commit f21d226 into Team-Puzzling:develop Oct 4, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REFACOTR] Dto -> entity [REFACTOR] 내부 DB 수정
2 participants