fix(ui/setup): thread exception
Method setCurrentState must be called on the main thread
This commit is contained in:
@@ -10,6 +10,7 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import me.rhunk.snapenhance.ui.setup.screens.SetupScreen
|
||||
import me.rhunk.snapenhance.ui.util.AlertDialogs
|
||||
|
||||
@@ -51,7 +52,9 @@ class MappingsScreen : SetupScreen() {
|
||||
return@launch
|
||||
}
|
||||
|
||||
goNext()
|
||||
withContext(Dispatchers.Main) {
|
||||
goNext()
|
||||
}
|
||||
}.onFailure {
|
||||
isGenerating = false
|
||||
infoText = context.translation["setup.mappings.generate_failure"] + "\n\n" + it.message
|
||||
|
||||
Reference in New Issue
Block a user