From 743e215fc1858d2897e49dc63bf048c9a5e411ab Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 26 Feb 2023 23:10:36 +0100 Subject: [PATCH] refactor(youtube/hide-timestamp): use better descriptions Signed-off-by: oSumAtrIX --- .../{HideTimePatch.kt => HideTimestampPatch.kt} | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/{HideTimePatch.kt => HideTimestampPatch.kt} (78%) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimestampPatch.kt similarity index 78% rename from src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimePatch.kt rename to src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimestampPatch.kt index b347052c8..e30f8cb5a 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/time/patch/HideTimestampPatch.kt @@ -19,11 +19,11 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch @Patch @DependsOn([IntegrationsPatch::class, SettingsPatch::class]) -@Name("hide-time") -@Description("Hides the videos time.") +@Name("hide-timestamp") +@Description("Hides timestamp in video player.") @HideTimeCompatibility @Version("0.0.1") -class HideTimePatch : BytecodePatch( +class HideTimestampPatch : BytecodePatch( listOf( TimeCounterFingerprint ) @@ -31,17 +31,17 @@ class HideTimePatch : BytecodePatch( override fun execute(context: BytecodeContext): PatchResult { SettingsPatch.PreferenceScreen.LAYOUT.addPreferences( SwitchPreference( - "revanced_hide_time", - StringResource("revanced_hide_time_title", "Hide time"), + "revanced_hide_timestamp", + StringResource("revanced_hide_timestamp_title", "Hide video timestamp"), false, - StringResource("revanced_hide_time_summary_on", "Time is hidden"), - StringResource("revanced_hide_time_summary_off", "Time is shown") + StringResource("revanced_hide_timestamp_summary_on", "Timestamp is hidden"), + StringResource("revanced_hide_timestamp_summary_off", "Timestamp is shown") ) ) TimeCounterFingerprint.result!!.mutableMethod.addInstructions( 0, """ - invoke-static { }, Lapp/revanced/integrations/patches/HideTimePatch;->hideTime()Z + invoke-static { }, Lapp/revanced/integrations/patches/HideTimestampPatch;->hideTimestamp()Z move-result v0 if-eqz v0, :hide_time return-void