Resolve Android warnings and improve stability
This commit is contained in:
parent
6e81547d83
commit
5ad97f4f21
3 changed files with 8 additions and 5 deletions
|
|
@ -10,6 +10,7 @@ import androidx.core.view.WindowCompat
|
|||
import android.view.WindowManager
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.WindowInsetsControllerCompat
|
||||
import org.koin.androidx.compose.KoinAndroidContext
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
|
@ -21,9 +22,11 @@ class MainActivity : ComponentActivity() {
|
|||
|
||||
|
||||
setContent {
|
||||
KoinAndroidContext {
|
||||
App()
|
||||
}
|
||||
}
|
||||
}
|
||||
private fun hideSystemBar() {
|
||||
// Pour les versions d'Android plus récentes (API 30+)
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ actual class FMediaPlayer actual constructor(
|
|||
while (isActive) {
|
||||
if (isRunning && !isHolding) {
|
||||
val elapsedNano = System.nanoTime() - lastEventNano
|
||||
val extraTicks = (elapsedNano / (usPerTick * 1000)).toLong()
|
||||
val extraTicks = (elapsedNano / (usPerTick * 1000)).toLong().coerceAtLeast(0L)
|
||||
val interpolated = (currentTickPos + extraTicks) / resolution
|
||||
val rawGrid = interpolated.toInt().coerceAtLeast(0)
|
||||
sharedScreenModel.updateActiveIndexByIndex(rawGrid)
|
||||
|
|
|
|||
|
|
@ -161,9 +161,9 @@ class Solfa(val sharedScreenModel: SharedScreenModel, private val fileRepository
|
|||
initialDirectory = if (initialPath.isNotBlank()) initialPath else homedir,
|
||||
onFileSelected = { path ->
|
||||
if (path != null) {
|
||||
screenModelScope.launch(Dispatchers.Default) {
|
||||
sharedScreenModel.reset()
|
||||
parse(path)
|
||||
screenModelScope.launch {
|
||||
stateSettings.saveLastUsedDir(path)
|
||||
}
|
||||
//loadSolfa()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue