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

[refact/kakao_login]: 카카오 로그인 코드 리팩토링 #77

Merged
merged 15 commits into from
Jan 11, 2024

Conversation

kangyuri1114
Copy link
Member

@kangyuri1114 kangyuri1114 commented Jan 10, 2024

개요

작업 사항

  • 로그인 뷰모델 분리
  • png 파일 삭제, 버튼 커스텀

변경 사항(optional)

  • 로그인 뷰모델 분리
  • LoginViewModel kakaoAccountCallback 부분 확인 부탁드립니다.

스크린샷(optional)

  • 코드리뷰 받고 올리겠습니다~

@kangyuri1114 kangyuri1114 added 🐰유리 유리 작업 🔎refact 내부 로직은 변경하지 않고 기존의 코드를 개선하는 리팩토링 labels Jan 10, 2024
@kangyuri1114 kangyuri1114 self-assigned this Jan 10, 2024
@kangyuri1114 kangyuri1114 requested a review from a team as a code owner January 10, 2024 17:41
Copy link
Member

@kez-lab kez-lab left a comment

Choose a reason for hiding this comment

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

확인 후 리마인드 부탁드려요!

Comment on lines +1 to +5
package com.hmh.hamyeonham.feature.login.model

data class LoginViewImageList(
val viewPagerImage: Int,
)
Copy link
Member

Choose a reason for hiding this comment

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

타입이 list가 아닌데 이름이 list인게 이상합니다, 굳이 데이터클래스를 선언할 필요도 없을 것 같네요

Comment on lines 57 to 32
binding.btnLogin.setOnClickListener {
loginWithKakaoApp()
binding.ivLoginBackground.setOnClickListener {
viewModel.loginWithKakaoApp(this)
Copy link
Member

Choose a reason for hiding this comment

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

이전 id가 나은 것 같기도... 이미지라서 쩔 수 없는 부분이라면 백그라운드라는건 빼도 될 것 같습니다.

Comment on lines 38 to 44
private fun handleKakaoLoginSuccess() {
Log.d("LoginActivity", viewModel.isSuccessKakaoLogin.value.toString())
viewModel.isSuccessKakaoLogin.flowWithLifecycle(lifecycle).onEach { successLogin ->
if (successLogin) {
moveToOnBoardingActivity()
}
}.launchIn(lifecycleScope)
Copy link
Member

Choose a reason for hiding this comment

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

슬슬 자체서버와의 로그인 로직도 염두해두셔야 할 것 같아요

Comment on lines 46 to 55
fun loginWithKakaoApp(context: Context) {
if (UserApiClient.instance.isKakaoTalkLoginAvailable(context)) {
UserApiClient.instance.loginWithKakaoTalk(
context = context,
callback = kakaoAppCallback,
)
} else {
UserApiClient.instance.loginWithKakaoAccount(
context = context,
callback = kakaoAccountCallback,
Copy link
Member

Choose a reason for hiding this comment

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

유리님이 생각하실때 카카오 로그인은 presentation 단에 있다고 생각하실까욥??

kangyuri1114 and others added 11 commits January 11, 2024 03:18
# Conflicts:
#	app/src/main/java/com/hmh/hamyeonham/SampleActivity.kt
#	app/src/main/java/com/hmh/hamyeonham/navigation/DefaultNavigationProvider.kt
#	core/common/src/main/java/com/hmh/hamyeonham/common/navigation/NavigationProvider.kt
#	feature/login/src/main/java/com/hmh/hamyeonham/feature/login/LoginActivity.kt
#	feature/statistics/src/main/java/com/hmh/hamyeonham/statistics/StaticsActivity.kt
Copy link
Member

@kez-lab kez-lab left a comment

Choose a reason for hiding this comment

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

수정 확인했습니다. 고생하셨습니다~!!

@kez-lab kez-lab merged commit 9eb9fed into develop Jan 11, 2024
1 check passed
@kez-lab kez-lab deleted the refact/kakao_login branch January 11, 2024 16:33
@jihyun0v0 jihyun0v0 changed the title [refact/kakao login]: 카카오 로그인 코드 리팩토링 [refact/kakao_login]: 카카오 로그인 코드 리팩토링 Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐰유리 유리 작업 🔎refact 내부 로직은 변경하지 않고 기존의 코드를 개선하는 리팩토링
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[feat]: 로그인, 온보딩 연결
2 participants