From b47a781ba710e6fb66e144ef95cdd51af358e4de Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Thu, 18 May 2023 17:34:49 +0200 Subject: [PATCH] feat(youtube): support version `18.19.35` --- .../patches/SeekbarTappingPatch.java | 9 +++---- .../integrations/settings/SettingsEnum.java | 4 +-- .../SegmentPlaybackController.java | 26 +++++-------------- 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/patches/SeekbarTappingPatch.java b/app/src/main/java/app/revanced/integrations/patches/SeekbarTappingPatch.java index 6739b0a1..3ac73c04 100644 --- a/app/src/main/java/app/revanced/integrations/patches/SeekbarTappingPatch.java +++ b/app/src/main/java/app/revanced/integrations/patches/SeekbarTappingPatch.java @@ -2,11 +2,8 @@ package app.revanced.integrations.patches; import app.revanced.integrations.settings.SettingsEnum; -public class SeekbarTappingPatch { - - //Used by app.revanced.patches.youtube.interaction.seekbar.patch.EnableSeekbarTappingPatch - public static boolean isTapSeekingEnabled() { - return SettingsEnum.TAP_SEEKING.getBoolean(); +public final class SeekbarTappingPatch { + public static boolean seekbarTappingEnabled() { + return SettingsEnum.SEEKBAR_TAPPING.getBoolean(); } - } diff --git a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java index 89f6be25..b0224d74 100644 --- a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java +++ b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java @@ -146,7 +146,7 @@ public enum SettingsEnum { DISABLE_ZOOM_HAPTICS("revanced_disable_zoom_haptics", BOOLEAN, TRUE), EXTERNAL_BROWSER("revanced_external_browser", BOOLEAN, TRUE, true), AUTO_REPEAT("revanced_auto_repeat", BOOLEAN, FALSE), - TAP_SEEKING("revanced_tap_seeking", BOOLEAN, TRUE), + SEEKBAR_TAPPING("revanced_seekbar_tapping", BOOLEAN, TRUE), SPOOF_SIGNATURE_VERIFICATION("revanced_spoof_signature_verification", BOOLEAN, TRUE, "revanced_spoof_signature_verification_user_dialog_message"), // Swipe controls @@ -553,7 +553,7 @@ public enum SettingsEnum { {DEPRECATED_EXTERNAL_BROWSER, EXTERNAL_BROWSER}, {DEPRECATED_AUTO_REPEAT, AUTO_REPEAT}, - {DEPRECATED_TAP_SEEKING, TAP_SEEKING}, + {DEPRECATED_TAP_SEEKING, SEEKBAR_TAPPING}, {DEPRECATED_HDR_AUTO_BRIGHTNESS, HDR_AUTO_BRIGHTNESS}, {DEPRECATED_RYD_USER_ID, RYD_USER_ID}, diff --git a/app/src/main/java/app/revanced/integrations/sponsorblock/SegmentPlaybackController.java b/app/src/main/java/app/revanced/integrations/sponsorblock/SegmentPlaybackController.java index ee96db04..e6bb328d 100644 --- a/app/src/main/java/app/revanced/integrations/sponsorblock/SegmentPlaybackController.java +++ b/app/src/main/java/app/revanced/integrations/sponsorblock/SegmentPlaybackController.java @@ -1,22 +1,11 @@ package app.revanced.integrations.sponsorblock; -import static app.revanced.integrations.utils.StringRef.str; - import android.graphics.Canvas; import android.graphics.Rect; import android.text.TextUtils; import android.util.TypedValue; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.Objects; - import app.revanced.integrations.patches.VideoInformation; import app.revanced.integrations.settings.SettingsEnum; import app.revanced.integrations.shared.PlayerType; @@ -29,6 +18,11 @@ import app.revanced.integrations.sponsorblock.ui.SponsorBlockViewController; import app.revanced.integrations.utils.LogHelper; import app.revanced.integrations.utils.ReVancedUtils; +import java.lang.reflect.Field; +import java.util.*; + +import static app.revanced.integrations.utils.StringRef.str; + /** * Handles showing, scheduling, and skipping of all {@link SponsorSegment} for the current video. * @@ -619,10 +613,7 @@ public class SegmentPlaybackController { } } - /** - * Injection point. - */ - public static void setSponsorBarAbsoluteLeft(Rect rect) { + private static void setSponsorBarAbsoluteLeft(Rect rect) { final int left = rect.left; if (sponsorBarAbsoluteLeft != left) { LogHelper.printDebug(() -> "setSponsorBarAbsoluteLeft: " + left); @@ -630,10 +621,7 @@ public class SegmentPlaybackController { } } - /** - * Injection point. - */ - public static void setSponsorBarAbsoluteRight(Rect rect) { + private static void setSponsorBarAbsoluteRight(Rect rect) { final int right = rect.right; if (sponsorAbsoluteBarRight != right) { LogHelper.printDebug(() -> "setSponsorBarAbsoluteRight: " + right);