-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT/#141] Lottie 파일 적용 #142
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 3 commits
b05d829
6e7074e
b7425b9
a168ab7
6a3f3e0
cdff62f
e9499e6
4cef0d7
d91c606
b3432df
6834f32
a67ef69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -21,11 +21,13 @@ class SplashViewModel @Inject constructor( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| viewModelScope.launch { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| val id = tokenManager.getId() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _sideEffect.emit( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (id != null) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SplashSideEffect.NavigateToHome | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SplashSideEffect.NavigateToOnboarding | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // if (id != null) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // SplashSideEffect.NavigateToHome | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // SplashSideEffect.NavigateToOnboarding | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SplashSideEffect.NavigateToOnboarding | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| val id = tokenManager.getId() | |
| _sideEffect.emit( | |
| if (id != null) { | |
| SplashSideEffect.NavigateToHome | |
| } else { | |
| SplashSideEffect.NavigateToOnboarding | |
| } | |
| // if (id != null) { | |
| // SplashSideEffect.NavigateToHome | |
| // } else { | |
| // SplashSideEffect.NavigateToOnboarding | |
| // } | |
| SplashSideEffect.NavigateToOnboarding | |
| _sideEffect.emit( | |
| SplashSideEffect.NavigateToOnboarding | |
| ) |
| val id = tokenManager.getId() | |
| _sideEffect.emit( | |
| if (id != null) { | |
| SplashSideEffect.NavigateToHome | |
| } else { | |
| SplashSideEffect.NavigateToOnboarding | |
| } | |
| // if (id != null) { | |
| // SplashSideEffect.NavigateToHome | |
| // } else { | |
| // SplashSideEffect.NavigateToOnboarding | |
| // } | |
| SplashSideEffect.NavigateToOnboarding | |
| val id = tokenManager.getId() | |
| _sideEffect.emit( | |
| if (id != null) { | |
| SplashSideEffect.NavigateToHome | |
| } else { | |
| SplashSideEffect.NavigateToOnboarding | |
| } | |
| ) |
🤖 Prompt for AI Agents
In
`@app/src/main/java/com/cherrish/android/presentation/splash/SplashViewModel.kt`
around lines 22 - 30, The code calls tokenManager.getId() into a now-unused
variable id and leaves a commented-out auto-login branch before always emitting
SplashSideEffect.NavigateToOnboarding; either remove the dead code or restore
the branch: delete the commented if/else and the unused id variable (or
re-enable the conditional that emits SplashSideEffect.NavigateToHome when id !=
null) in SplashViewModel where _sideEffect.emit is called so there is no
leftover commented logic or unused tokenManager.getId() call.
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.
ON_START이벤트 사용 시 중복 실행 가능성이 있습니다.Lifecycle.Event.ON_START는 앱이 백그라운드에서 포그라운드로 돌아올 때마다 다시 트리거됩니다. 사용자가 스플래시 화면에서 다른 앱으로 전환했다가 돌아오면 3초 딜레이 후 네비게이션이 다시 시도될 수 있습니다.또한
rememberCoroutineScope로 시작된 코루틴은 Composable이 dispose되어도 자동으로 취소되지 않을 수 있어, 화면 전환 후에도 네비게이션 로직이 실행될 위험이 있습니다.🔧 LaunchedEffect 사용 권장
LaunchedEffect(Unit)은 최초 composition 시 한 번만 실행되며, recomposition이나 lifecycle 변경에 영향받지 않습니다. 또한 Composable이 dispose될 때 자동으로 취소됩니다.🤖 Prompt for AI Agents