File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
feature/splash/src/main/java/team/ppac/splash Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import androidx.compose.ui.res.painterResource
20
20
import androidx.compose.ui.unit.dp
21
21
import androidx.core.view.WindowCompat
22
22
import dagger.hilt.android.AndroidEntryPoint
23
+ import team.ppac.common.android.extension.forceKillApplication
23
24
import team.ppac.designsystem.FarmemeTheme
24
25
import team.ppac.navigator.MainNavigator
25
26
import team.ppac.splash.mvi.SplashIntent
@@ -46,6 +47,10 @@ class SplashActivity : ComponentActivity() {
46
47
withFinish = true
47
48
)
48
49
}
50
+
51
+ SplashSideEffect .ForceFinish -> {
52
+ this @SplashActivity.forceKillApplication()
53
+ }
49
54
}
50
55
}
51
56
}
Original file line number Diff line number Diff line change @@ -49,9 +49,8 @@ class SplashViewModel @Inject constructor(
49
49
override suspend fun handleIntent (intent : SplashIntent ) {
50
50
when (intent) {
51
51
SplashIntent .ClickDialogConfirm -> {
52
- reduce {
53
- copy(isNetworkError = false )
54
- }
52
+ reduce { copy(isNetworkError = false ) }
53
+ postSideEffect(SplashSideEffect .ForceFinish )
55
54
}
56
55
}
57
56
}
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ import team.ppac.common.android.base.UiSideEffect
4
4
5
5
sealed class SplashSideEffect : UiSideEffect {
6
6
data object NavigateToMain : SplashSideEffect ()
7
+ data object ForceFinish : SplashSideEffect ()
7
8
}
You can’t perform that action at this time.
0 commit comments