From ede765ae3c506909ee8a99517b99b6f5f113f01a Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Wed, 3 May 2023 11:50:35 +0400 Subject: [PATCH] feat(youtube/settings): add reset button to edit preference dialog (#2047) --- .../patches/shared/settings/preference/impl/TextPreference.kt | 2 +- .../patches/youtube/layout/theme/resource/ThemeResourcePatch.kt | 2 +- src/main/resources/settings/host/values/strings.xml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/TextPreference.kt b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/TextPreference.kt index 907a4a16..da216f90 100644 --- a/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/TextPreference.kt +++ b/src/main/kotlin/app/revanced/patches/shared/settings/preference/impl/TextPreference.kt @@ -23,7 +23,7 @@ internal class TextPreference( val default: String? = null, val summary: StringResource? = null ) : BasePreference(key, title) { - override val tag: String = "EditTextPreference" + override val tag: String = "app.revanced.integrations.settingsmenu.ResettableEditTextPreference" override fun serialize(ownerDocument: Document, resourceCallback: ((IResource) -> Unit)?): Element { return super.serialize(ownerDocument, resourceCallback).apply { diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/resource/ThemeResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/resource/ThemeResourcePatch.kt index 12d39609..599ae3d9 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/theme/resource/ThemeResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/theme/resource/ThemeResourcePatch.kt @@ -20,7 +20,7 @@ class ThemeResourcePatch : ResourcePatch { "revanced_seekbar_color", StringResource("revanced_seekbar_color_title", "Seekbar color"), InputType.STRING, - "#ffff0000", + "#FF0000", StringResource( "revanced_seekbar_color_summary", "The color of the seekbar for the dark theme." diff --git a/src/main/resources/settings/host/values/strings.xml b/src/main/resources/settings/host/values/strings.xml index c0740672..d17cc007 100644 --- a/src/main/resources/settings/host/values/strings.xml +++ b/src/main/resources/settings/host/values/strings.xml @@ -1,4 +1,5 @@ Do you wish to proceed? + Reset