diff --git a/app/build.gradle b/app/build.gradle index 9db761d08..56b9bfbd2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -82,12 +82,12 @@ afterEvaluate { } dependencies { //noinspection GradleDependency - implementation('com.github.KotatsuApp:kotatsu-parsers:b7613606c0') { + implementation('com.github.KotatsuApp:kotatsu-parsers:c6d1f1b525') { exclude group: 'org.json', module: 'json' } coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' - implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.22' + implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.23' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0' implementation 'androidx.appcompat:appcompat:1.6.1' @@ -121,7 +121,7 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp:4.12.0' implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.12.0' - implementation 'com.squareup.okio:okio:3.8.0' + implementation 'com.squareup.okio:okio:3.9.0' implementation 'com.hannesdorfmann:adapterdelegates4-kotlin-dsl:4.3.2' implementation 'com.hannesdorfmann:adapterdelegates4-kotlin-dsl-viewbinding:4.3.2' @@ -147,7 +147,7 @@ dependencies { debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.13' testImplementation 'junit:junit:4.13.2' - testImplementation 'org.json:json:20240205' + testImplementation 'org.json:json:20240303' testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0' androidTestImplementation 'androidx.test:runner:1.5.2' diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/prefs/SourceSettings.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/prefs/SourceSettings.kt index af19f5ae1..a2b38fffe 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/core/prefs/SourceSettings.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/prefs/SourceSettings.kt @@ -30,6 +30,7 @@ class SourceSettings(context: Context, source: MangaSource) : MangaSourceConfig is ConfigKey.UserAgent -> prefs.getString(key.key, key.defaultValue).ifNullOrEmpty { key.defaultValue } is ConfigKey.Domain -> prefs.getString(key.key, key.defaultValue).ifNullOrEmpty { key.defaultValue } is ConfigKey.ShowSuspiciousContent -> prefs.getBoolean(key.key, key.defaultValue) + is ConfigKey.SplitByTranslations -> prefs.getBoolean(key.key, key.defaultValue) } as T } @@ -38,6 +39,7 @@ class SourceSettings(context: Context, source: MangaSource) : MangaSourceConfig is ConfigKey.Domain -> putString(key.key, value as String?) is ConfigKey.ShowSuspiciousContent -> putBoolean(key.key, value as Boolean) is ConfigKey.UserAgent -> putString(key.key, value as String?) + is ConfigKey.SplitByTranslations -> putBoolean(key.key, value as Boolean) } } } diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/settings/sources/SourceSettingsExt.kt b/app/src/main/kotlin/org/koitharu/kotatsu/settings/sources/SourceSettingsExt.kt index f0c239c23..a023d127a 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/settings/sources/SourceSettingsExt.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/settings/sources/SourceSettingsExt.kt @@ -62,6 +62,14 @@ fun PreferenceFragmentCompat.addPreferencesFromRepository(repository: RemoteMang setTitle(R.string.show_suspicious_content) } } + + is ConfigKey.SplitByTranslations -> { + SwitchPreferenceCompat(requireContext()).apply { + setDefaultValue(key.defaultValue) + setTitle(R.string.split_by_translations) + setSummary(R.string.split_by_translations_summary) + } + } } preference.isIconSpaceReserved = false preference.key = key.key diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4a74c2164..b98e7d9af 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -631,4 +631,6 @@ This will permanently delete all chapters marked as read from your local storage. You can re-download it later, but the imported chapters may be lost forever Delete read chapters automatically Runs when the application starts + Split by translations + Show chapters with different translations separately, rather than in one list diff --git a/build.gradle b/build.gradle index ce41cdb19..79774f440 100644 --- a/build.gradle +++ b/build.gradle @@ -5,9 +5,9 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:8.3.0' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23' classpath 'com.google.dagger:hilt-android-gradle-plugin:2.51' - classpath 'com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.22-1.0.17' + classpath 'com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.23-1.0.19' } }