Sonar fixes
All checks were successful
SonarQube Scan / SonarQube Trigger (push) Successful in 3m58s

This commit is contained in:
2025-07-19 00:04:19 +02:00
committed by Christian Basler
parent 1527ab0cb0
commit 6d58b93477
15 changed files with 339 additions and 335 deletions

View File

@@ -3,8 +3,8 @@ package ch.dissem.yaep.ui.common
import ch.dissem.yaep.domain.Game
import io.github.oshai.kotlinlogging.KotlinLogging
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlin.coroutines.CoroutineContext
import kotlin.io.path.Path
import kotlin.io.path.createFile
import kotlin.io.path.isDirectory
@@ -15,8 +15,8 @@ import kotlin.time.ExperimentalTime
private val log = KotlinLogging.logger {}
@OptIn(ExperimentalTime::class)
actual fun CoroutineScope.logGame(game: Game) {
launch(Dispatchers.IO) {
actual fun CoroutineScope.logGame(game: Game, dispatcher: CoroutineContext) {
launch(dispatcher) {
val dirName = """${System.getProperty("user.home")}/.yaep"""
val dir = Path(dirName)
if (dir.isDirectory()) {