Skip to content

Commit beca74c

Browse files
committed
[Feat] 확인 클릭 시 앱 강제종료
1 parent 3e47fe3 commit beca74c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

feature/splash/src/main/java/team/ppac/splash/SplashActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import androidx.compose.ui.res.painterResource
2020
import androidx.compose.ui.unit.dp
2121
import androidx.core.view.WindowCompat
2222
import dagger.hilt.android.AndroidEntryPoint
23+
import team.ppac.common.android.extension.forceKillApplication
2324
import team.ppac.designsystem.FarmemeTheme
2425
import team.ppac.navigator.MainNavigator
2526
import team.ppac.splash.mvi.SplashIntent
@@ -46,6 +47,10 @@ class SplashActivity : ComponentActivity() {
4647
withFinish = true
4748
)
4849
}
50+
51+
SplashSideEffect.ForceFinish -> {
52+
this@SplashActivity.forceKillApplication()
53+
}
4954
}
5055
}
5156
}

feature/splash/src/main/java/team/ppac/splash/SplashViewModel.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ class SplashViewModel @Inject constructor(
4949
override suspend fun handleIntent(intent: SplashIntent) {
5050
when (intent) {
5151
SplashIntent.ClickDialogConfirm -> {
52-
reduce {
53-
copy(isNetworkError = false)
54-
}
52+
reduce { copy(isNetworkError = false) }
53+
postSideEffect(SplashSideEffect.ForceFinish)
5554
}
5655
}
5756
}

feature/splash/src/main/java/team/ppac/splash/mvi/SplashSideEffect.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ import team.ppac.common.android.base.UiSideEffect
44

55
sealed class SplashSideEffect : UiSideEffect {
66
data object NavigateToMain : SplashSideEffect()
7+
data object ForceFinish : SplashSideEffect()
78
}

0 commit comments

Comments
 (0)