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

Feature/jaino/#86 #99

Merged
merged 17 commits into from
Jan 12, 2024
Merged

Feature/jaino/#86 #99

merged 17 commits into from
Jan 12, 2024

Conversation

jeongjaino
Copy link
Member

1. πŸ“„ κ΄€λ ¨λœ 이슈 및 μ†Œκ°œ

#86 νšŒμ› μ‚­μ œμ‹œ 데이터도 ν•¨κ»˜ μ‚­μ œν•˜λŠ” 둜직 κ΅¬ν˜„

2. πŸ”₯λ³€κ²½λœ 점

νšŒμ› 정보 μ‚­μ œ 둜직 κ΅¬ν˜„
λ§€λ‹ˆμ € 정보 μ‚­μ œ 둜직 κ΅¬ν˜„

νšŒμ› κΆŒν•œμ— 따라 νƒˆν‡΄ν•˜λŠ” μœ μŠ€μΌ€μ΄μŠ€ κ΅¬ν˜„

3. πŸ“Έ μŠ€ν¬λ¦°μƒ·(선택)

4. πŸ’‘μ•Œκ²Œλœ ν˜Ήμ€ κΆκΈˆν•œ 사항듀

@jeongjaino jeongjaino added πŸš€μ§„ν˜ΈπŸš€ ESTP μ •μ§„ν˜Έ 23μ„Έ 🌱기λŠ₯🌱 μƒˆλ‘œμš΄ κΈ°λŠ₯ 두두λ‘₯μž₯! πŸ”₯리뷰 κΈ°λ‹€λ¦¬λŠ” 쀑πŸ”₯ PR을 올리고 μ½”λ“œλ¦¬λ·°λ₯Ό 기닀리고 μžˆλŠ” μƒνƒœμž…λ‹ˆλ‹€. labels Jan 11, 2024
@jeongjaino jeongjaino self-assigned this Jan 11, 2024
Copy link
Member

@tgyuuAn tgyuuAn 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 12 to +34
class DeleteUserUseCase @Inject constructor(
private val authRepository: AuthRepository,
private val userRepository: UserRepository,
private val managementRepository: ManagementRepository,
private val getUserRoleUseCase: GetUserRoleUseCase,
) {
suspend operator fun invoke(): Result<Unit> =
authRepository.deleteUser()
suspend operator fun invoke(userId: String): Result<Unit> = runCatching {
val userRole = getUserRoleUseCase().getOrThrow()
when (userRole) {
UserRole.GUEST -> { return@runCatching }

UserRole.MEMBER -> {
userRepository.deleteUserProfile(userId)
}

UserRole.MANAGER -> {
userRepository.deleteUserProfile(userId)
managementRepository.deleteManager(userId)
}
}

authRepository.deleteUser().getOrThrow()
}
Copy link
Member

Choose a reason for hiding this comment

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

μ™€μš° UseCase λ‚΄λΆ€μ—μ„œ UseCaseλ₯Ό μ‚¬μš©ν•  수 μžˆλ‹€λŠ” 것은 μ•Œκ³ μžˆμ—ˆλŠ”λ°,

μ§μ ‘μ μœΌλ‘œ μ‚¬μš©ν•œ 것은 처음 λ΄€μ–΄μš”.

λŒ€λ°• μ‹ κΈ°ν•˜λ„€μš”.

이런 μ‹μœΌλ‘œ μ‚¬μš©λ  수 μžˆκ² κ΅°μš”!

Copy link
Member Author

Choose a reason for hiding this comment

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

μΊ¬μΊ¬ μ’‹μŠ΅λ‹ˆλ‹€μž‡!

when (event) {
is SplashViewModel.SplashEvent.TimerDone -> navigateToAuth()
is SplashViewModel.SplashEvent.SignInUser -> { navigateToNotice() }
is SplashViewModel.SplashEvent.NonSignInUser -> { navigateToAuth() }
Copy link
Member

Choose a reason for hiding this comment

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

이 λΆ€λΆ„μ—μ„œ μŠ€μ½”ν”„λ₯Ό μ‚¬μš©ν•œ μ΄μœ κ°€ μžˆμ„κΉŒμš”?!

Copy link
Member Author

Choose a reason for hiding this comment

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

μΊ¬μΊ¬ μŠ€μ½”ν”„λ₯Ό μ†Œκ±°ν•  수 μžˆλ‹€λŠ” 생각을 λͺ»ν–ˆλ„€μš”, λ°”λ‘œ μ†Œκ±°ν•˜κ² μŠ΅λ‹ˆλ‹€μž‡!

Comment on lines 20 to 40
init {
viewModelScope.launch {
delay(2000)
event(SplashEvent.TimerDone)
isUserSignIn()
}
}

private fun isUserSignIn() {
viewModelScope.launch {
isUserSignInUseCase()
.onSuccess { isSignIn ->
if (isSignIn) {
_splashUiEvent.emit(SplashEvent.SignInUser)
} else {
_splashUiEvent.emit(SplashEvent.NonSignInUser)
}
}.onFailure { throwable ->
_splashUiEvent.emit(SplashEvent.Failure(throwable))
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

viewModelScope λ₯Ό ν•œλ²ˆ 더 μ—¬μ‹  μ΄μœ κ°€ μžˆμ„κΉŒμš”?

suspend fun으둜 μ„ μ–Έν•˜λŠ” 것은 μ–΄λ–¨κΉŒμš”?!

ν˜Ήμ€ delayλ₯Ό ν•¨μˆ˜ 내뢀에 νŒŒλΌλ―Έν„°λ‘œ λ„˜κ²¨μ€€λ‹€λ˜μ§€?!

Copy link
Member Author

Choose a reason for hiding this comment

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

κΈ°μ‘΄ init λ‘œμ§μ„ μ œλŒ€λ‘œ λ“€μ—¬λ‹€ 보지 λͺ»ν•˜κ³ , μž‘μ„±ν–ˆμŠ΅λ‹ˆλ‹€ γ… γ… 

suspend function μ•„μ£Ό κ΅Ώ μΈμ‚¬μ΄νŠΈμž…λ‹ˆλ‹€ ~ !
suspend function으둜 λ³€κ²½ν• κ²Œμš©~

@tgyuuAn tgyuuAn added πŸŒŸλ¨Έμ§€ ν•΄μ£Όμ„Έμš”πŸŒŸ μ½”λ“œ 리뷰가 μ™„λ£Œλœ λ’€ PR을 μ˜¬λ¦°μ‚¬λžŒμ΄ Mergeλ₯Ό ν•˜λ©΄ λ˜λŠ” λ‹¨κ³„μž…λ‹ˆλ‹€. βœοΈμˆ˜μ • μš”μ²­βœοΈ μ½”λ“œ 리뷰후 μ½”λ“œ μˆ˜μ • μš”μ²­ and removed πŸ”₯리뷰 κΈ°λ‹€λ¦¬λŠ” 쀑πŸ”₯ PR을 올리고 μ½”λ“œλ¦¬λ·°λ₯Ό 기닀리고 μžˆλŠ” μƒνƒœμž…λ‹ˆλ‹€. πŸŒŸλ¨Έμ§€ ν•΄μ£Όμ„Έμš”πŸŒŸ μ½”λ“œ 리뷰가 μ™„λ£Œλœ λ’€ PR을 μ˜¬λ¦°μ‚¬λžŒμ΄ Mergeλ₯Ό ν•˜λ©΄ λ˜λŠ” λ‹¨κ³„μž…λ‹ˆλ‹€. labels Jan 11, 2024
@tgyuuAn tgyuuAn added πŸŒŸλ¨Έμ§€ ν•΄μ£Όμ„Έμš”πŸŒŸ μ½”λ“œ 리뷰가 μ™„λ£Œλœ λ’€ PR을 μ˜¬λ¦°μ‚¬λžŒμ΄ Mergeλ₯Ό ν•˜λ©΄ λ˜λŠ” λ‹¨κ³„μž…λ‹ˆλ‹€. and removed βœοΈμˆ˜μ • μš”μ²­βœοΈ μ½”λ“œ 리뷰후 μ½”λ“œ μˆ˜μ • μš”μ²­ labels Jan 12, 2024
@jeongjaino jeongjaino merged commit 2ba4f34 into develop Jan 12, 2024
@tgyuuAn tgyuuAn deleted the feature/jaino/#86 branch February 6, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸŒŸλ¨Έμ§€ ν•΄μ£Όμ„Έμš”πŸŒŸ μ½”λ“œ 리뷰가 μ™„λ£Œλœ λ’€ PR을 μ˜¬λ¦°μ‚¬λžŒμ΄ Mergeλ₯Ό ν•˜λ©΄ λ˜λŠ” λ‹¨κ³„μž…λ‹ˆλ‹€. 🌱기λŠ₯🌱 μƒˆλ‘œμš΄ κΈ°λŠ₯ 두두λ‘₯μž₯! πŸš€μ§„ν˜ΈπŸš€ ESTP μ •μ§„ν˜Έ 23μ„Έ
Projects
None yet
2 participants