Skip to content

Commit ce0388a

Browse files
committed
[NDGL-102] refactor: Splash 모듈에 UiIntent 적용
1 parent 0412fea commit ce0388a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
package com.yapp.ndgl.feature.splash
22

3+
import com.yapp.ndgl.core.base.UiIntent
34
import com.yapp.ndgl.core.base.UiSideEffect
45
import com.yapp.ndgl.core.base.UiState
56

67
class SplashState : UiState
78

9+
sealed interface SplashUiIntent : UiIntent
10+
811
sealed interface SplashSideEffect : UiSideEffect {
912
data class NavigateToHome(val isFirstUser: Boolean) : SplashSideEffect
1013
}

feature/splash/src/main/java/com/yapp/ndgl/feature/splash/SplashViewModel.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package com.yapp.ndgl.feature.splash
22

33
import androidx.lifecycle.viewModelScope
44
import com.yapp.ndgl.core.base.BaseViewModel
5-
import com.yapp.ndgl.core.base.UiIntent
65
import com.yapp.ndgl.core.util.suspendRunCatching
76
import com.yapp.ndgl.data.auth.repository.AuthRepository
87
import dagger.hilt.android.lifecycle.HiltViewModel
@@ -12,7 +11,7 @@ import javax.inject.Inject
1211
@HiltViewModel
1312
class SplashViewModel @Inject constructor(
1413
private val authRepository: AuthRepository,
15-
) : BaseViewModel<SplashState, UiIntent, SplashSideEffect>(
14+
) : BaseViewModel<SplashState, SplashUiIntent, SplashSideEffect>(
1615
initialState = SplashState(),
1716
) {
1817
init {
@@ -29,7 +28,5 @@ class SplashViewModel @Inject constructor(
2928
}
3029
}
3130

32-
override suspend fun handleIntent(intent: UiIntent) {
33-
// Splash에 따로 intent 존재하지 않음
34-
}
31+
override suspend fun handleIntent(intent: SplashUiIntent) = Unit
3532
}

0 commit comments

Comments
 (0)