From 2dd2db72258f3a3d4e649ce2fcc2aee7aed951b6 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 9 Sep 2023 14:48:57 -0400 Subject: [PATCH] Update to Kotlin 1.9.10 --- .../main/java/eu/kanade/tachiyomi/data/track/kavita/Kavita.kt | 2 +- .../eu/kanade/tachiyomi/data/track/suwayomi/TachideskApi.kt | 3 ++- gradle/compose.versions.toml | 2 +- gradle/kotlinx.versions.toml | 2 +- .../kotlin/eu/kanade/tachiyomi/source/ConfigurableSource.kt | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/Kavita.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/Kavita.kt index 0a45187a36..c117307543 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/Kavita.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/Kavita.kt @@ -119,7 +119,7 @@ class Kavita(private val context: Context, id: Long) : TrackService(id, "Kavita" .reduce(Long::or) and Long.MAX_VALUE } val preferences: SharedPreferences by lazy { - context.getSharedPreferences("source_$sourceSuffixID", 0x0000) + context.getSharedPreferences("source_$sourceSuffixID", Context.MODE_PRIVATE) } val prefApiUrl = preferences.getString("APIURL", "")!! if (prefApiUrl.isEmpty()) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/TachideskApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/TachideskApi.kt index 24127c63a7..86227095d2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/TachideskApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/TachideskApi.kt @@ -1,6 +1,7 @@ package eu.kanade.tachiyomi.data.track.suwayomi import android.app.Application +import android.content.Context import android.content.SharedPreferences import eu.kanade.tachiyomi.data.database.models.Track import eu.kanade.tachiyomi.data.track.TrackManager @@ -107,7 +108,7 @@ class TachideskApi { } private val preferences: SharedPreferences by lazy { - Injekt.get().getSharedPreferences("source_$tachideskExtensionId", 0x0000) + Injekt.get().getSharedPreferences("source_$tachideskExtensionId", Context.MODE_PRIVATE) } private fun getPrefBaseUrl(): String = preferences.getString(ADDRESS_TITLE, ADDRESS_DEFAULT)!! diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index e215362633..dc18de7852 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -1,5 +1,5 @@ [versions] -compiler = "1.5.2" +compiler = "1.5.3" compose-bom = "2023.09.00-alpha02" accompanist = "0.33.1-alpha" diff --git a/gradle/kotlinx.versions.toml b/gradle/kotlinx.versions.toml index 61d4968c4c..be52d57f97 100644 --- a/gradle/kotlinx.versions.toml +++ b/gradle/kotlinx.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin_version = "1.9.0" +kotlin_version = "1.9.10" serialization_version = "1.6.0" xml_serialization_version = "0.86.1" diff --git a/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/ConfigurableSource.kt b/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/ConfigurableSource.kt index e6a019ecca..4be411e3b2 100644 --- a/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/ConfigurableSource.kt +++ b/source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/ConfigurableSource.kt @@ -1,6 +1,7 @@ package eu.kanade.tachiyomi.source import android.app.Application +import android.content.Context import android.content.SharedPreferences import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get @@ -13,7 +14,7 @@ interface ConfigurableSource : Source { * @since extensions-lib 1.5 */ fun getPreferences(): SharedPreferences = - Injekt.get().getSharedPreferences("source_$id", 0x0000) + Injekt.get().getSharedPreferences("source_$id", Context.MODE_PRIVATE) fun setupPreferenceScreen(screen: PreferenceScreen) }