From 0086d597ad4b043a2676f82051e4785237a34362 Mon Sep 17 00:00:00 2001 From: bpedryc Date: Wed, 22 Nov 2023 14:26:35 +0100 Subject: [PATCH] remove ensureNeverFrozen() --- .../kotlin/co/touchlab/kampkit/data/dog/DogApiImpl.kt | 5 ----- .../co/touchlab/kampkit/data/dog/NetworkBreedRepository.kt | 5 ----- 2 files changed, 10 deletions(-) diff --git a/shared/src/commonMain/kotlin/co/touchlab/kampkit/data/dog/DogApiImpl.kt b/shared/src/commonMain/kotlin/co/touchlab/kampkit/data/dog/DogApiImpl.kt index dfb16667..c67507b3 100644 --- a/shared/src/commonMain/kotlin/co/touchlab/kampkit/data/dog/DogApiImpl.kt +++ b/shared/src/commonMain/kotlin/co/touchlab/kampkit/data/dog/DogApiImpl.kt @@ -1,6 +1,5 @@ package co.touchlab.kampkit.data.dog -import co.touchlab.stately.ensureNeverFrozen import io.ktor.client.HttpClient import io.ktor.client.call.body import io.ktor.client.engine.HttpClientEngine @@ -40,10 +39,6 @@ class DogApiImpl(private val log: KermitLogger, engine: HttpClientEngine) : DogA } } - init { - ensureNeverFrozen() - } - override suspend fun getJsonFromApi(): DogResult { log.d { "Fetching Breeds from network" } return client.get { diff --git a/shared/src/commonMain/kotlin/co/touchlab/kampkit/data/dog/NetworkBreedRepository.kt b/shared/src/commonMain/kotlin/co/touchlab/kampkit/data/dog/NetworkBreedRepository.kt index df74d05f..528a07db 100644 --- a/shared/src/commonMain/kotlin/co/touchlab/kampkit/data/dog/NetworkBreedRepository.kt +++ b/shared/src/commonMain/kotlin/co/touchlab/kampkit/data/dog/NetworkBreedRepository.kt @@ -3,7 +3,6 @@ package co.touchlab.kampkit.data.dog import co.touchlab.kampkit.domain.breed.Breed import co.touchlab.kampkit.domain.breed.BreedRepository import co.touchlab.kermit.Logger -import co.touchlab.stately.ensureNeverFrozen import com.russhwolf.settings.Settings import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.first @@ -24,10 +23,6 @@ class NetworkBreedRepository( internal const val DB_TIMESTAMP_KEY = "DbTimestampKey" } - init { - ensureNeverFrozen() - } - override fun getBreeds(): Flow> { return dbHelper.selectAllItems().map { list -> list.map { dbBreed -> dbBreed.toDomain() }