-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
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.
확인 후 리마인드 부탁드려요!
package com.hmh.hamyeonham.feature.login.model | ||
|
||
data class LoginViewImageList( | ||
val viewPagerImage: 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.
타입이 list가 아닌데 이름이 list인게 이상합니다, 굳이 데이터클래스를 선언할 필요도 없을 것 같네요
binding.btnLogin.setOnClickListener { | ||
loginWithKakaoApp() | ||
binding.ivLoginBackground.setOnClickListener { | ||
viewModel.loginWithKakaoApp(this) |
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.
이전 id가 나은 것 같기도... 이미지라서 쩔 수 없는 부분이라면 백그라운드라는건 빼도 될 것 같습니다.
private fun handleKakaoLoginSuccess() { | ||
Log.d("LoginActivity", viewModel.isSuccessKakaoLogin.value.toString()) | ||
viewModel.isSuccessKakaoLogin.flowWithLifecycle(lifecycle).onEach { successLogin -> | ||
if (successLogin) { | ||
moveToOnBoardingActivity() | ||
} | ||
}.launchIn(lifecycleScope) |
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.
슬슬 자체서버와의 로그인 로직도 염두해두셔야 할 것 같아요
fun loginWithKakaoApp(context: Context) { | ||
if (UserApiClient.instance.isKakaoTalkLoginAvailable(context)) { | ||
UserApiClient.instance.loginWithKakaoTalk( | ||
context = context, | ||
callback = kakaoAppCallback, | ||
) | ||
} else { | ||
UserApiClient.instance.loginWithKakaoAccount( | ||
context = context, | ||
callback = kakaoAccountCallback, |
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.
유리님이 생각하실때 카카오 로그인은 presentation 단에 있다고 생각하실까욥??
# 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
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.
수정 확인했습니다. 고생하셨습니다~!!
개요
작업 사항
변경 사항(optional)
스크린샷(optional)