mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-22 08:42:38 +00:00
fix restarting after rotation
This commit is contained in:
2 files changed
+6
-2
No files matched your search
@@ -466,7 +466,7 @@ fun AltMainScreen(
|
||||
|
||||
launchViewModel.clearCrashInfo()
|
||||
coroutineScope.launch {
|
||||
launchViewModel.beginLaunchFlow()
|
||||
launchViewModel.beginLaunchFlow(true)
|
||||
}
|
||||
},
|
||||
onMore = {
|
||||
|
||||
@@ -157,11 +157,15 @@ class LaunchViewModel(private val application: Application): ViewModel() {
|
||||
_uiState.emit(LaunchUIState.Ready)
|
||||
}
|
||||
|
||||
suspend fun beginLaunchFlow() {
|
||||
suspend fun beginLaunchFlow(isRestart: Boolean = false) {
|
||||
if (_uiState.value !is LaunchUIState.Initial && _uiState.value !is LaunchUIState.Cancelled) {
|
||||
return
|
||||
}
|
||||
|
||||
if (_uiState.value is LaunchUIState.Cancelled && !isRestart) {
|
||||
return
|
||||
}
|
||||
|
||||
isCancelling = false
|
||||
|
||||
if (!GamePackageUtils.isGameInstalled(application.packageManager)) {
|
||||
|
||||
Reference in new issue
Block a user