From 81effea01c33d4b47f6802a3d5e31fa39609a6fb Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Sun, 17 Nov 2024 05:27:42 +0600 Subject: [PATCH] Slightly tweak Preference.PreferenceItem.CustomPreference --- .../java/eu/kanade/presentation/more/settings/Preference.kt | 6 +++--- .../eu/kanade/presentation/more/settings/PreferenceItem.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/Preference.kt b/app/src/main/java/eu/kanade/presentation/more/settings/Preference.kt index d2ed81c58..88a33715e 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/Preference.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/Preference.kt @@ -162,12 +162,12 @@ sealed class Preference { data class CustomPreference( override val title: String, - val content: @Composable (PreferenceItem) -> Unit, - ) : PreferenceItem() { + val content: @Composable () -> Unit, + ) : PreferenceItem() { override val enabled: Boolean = true override val subtitle: String? = null override val icon: ImageVector? = null - override val onValueChanged: suspend (newValue: String) -> Boolean = { true } + override val onValueChanged: suspend (newValue: Unit) -> Boolean = { true } } } diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceItem.kt b/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceItem.kt index 5a3c9d53b..53caa0b06 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceItem.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/PreferenceItem.kt @@ -167,7 +167,7 @@ internal fun PreferenceItem( InfoWidget(text = item.title) } is Preference.PreferenceItem.CustomPreference -> { - item.content(item) + item.content() } } }