Skip to content

Commit

Permalink
[Feat] 확인 클릭 시 앱 강제종료
Browse files Browse the repository at this point in the history
  • Loading branch information
JaesungLeee committed Oct 3, 2024
1 parent 8180298 commit c23763e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import androidx.core.view.WindowCompat
import dagger.hilt.android.AndroidEntryPoint
import team.ppac.common.android.extension.forceKillApplication
import team.ppac.designsystem.FarmemeTheme
import team.ppac.navigator.MainNavigator
import team.ppac.splash.mvi.SplashIntent
Expand All @@ -46,6 +47,10 @@ class SplashActivity : ComponentActivity() {
withFinish = true
)
}

SplashSideEffect.ForceFinish -> {
this@SplashActivity.forceKillApplication()
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ class SplashViewModel @Inject constructor(
override suspend fun handleIntent(intent: SplashIntent) {
when (intent) {
SplashIntent.ClickDialogConfirm -> {
reduce {
copy(isNetworkError = false)
}
reduce { copy(isNetworkError = false) }
postSideEffect(SplashSideEffect.ForceFinish)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import team.ppac.common.android.base.UiSideEffect

sealed class SplashSideEffect : UiSideEffect {
data object NavigateToMain : SplashSideEffect()
data object ForceFinish : SplashSideEffect()
}

0 comments on commit c23763e

Please sign in to comment.