Merge branch 'refs/heads/dev' into dev-gh

This commit is contained in:
rhunk 2024-10-24 22:57:45 +02:00
commit 721106ae2b
2 changed files with 13 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.Dialog
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import me.rhunk.snapenhance.ui.setup.screens.SetupScreen import me.rhunk.snapenhance.ui.setup.screens.SetupScreen
import me.rhunk.snapenhance.ui.util.AlertDialogs import me.rhunk.snapenhance.ui.util.AlertDialogs
@ -51,7 +52,9 @@ class MappingsScreen : SetupScreen() {
return@launch return@launch
} }
goNext() withContext(Dispatchers.Main) {
goNext()
}
}.onFailure { }.onFailure {
isGenerating = false isGenerating = false
infoText = context.translation["setup.mappings.generate_failure"] + "\n\n" + it.message infoText = context.translation["setup.mappings.generate_failure"] + "\n\n" + it.message

View File

@ -63,9 +63,17 @@ class SendOverride : Feature("Send Override") {
} }
// set back the original snap duration // set back the original snap duration
remove(2)
snapDocPlayback.getByteArray(2)?.let { snapDocPlayback.getByteArray(2)?.let {
val originalHasSound = firstOrNull(2)?.toReader()?.getVarInt(5)
remove(2)
addBuffer(2, it) addBuffer(2, it)
originalHasSound?.let { hasSound ->
edit(2) {
remove(5)
addVarInt(5, hasSound)
}
}
} }
} }