feat(YouTube): Add Disable fine scrubbing gesture patch

This commit is contained in:
oSumAtrIX 2023-10-07 03:50:41 +02:00
parent 176196b52c
commit 4498f39b8c
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package app.revanced.integrations.patches;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import app.revanced.integrations.settings.SettingsEnum;
public final class DisableFineScrubbingGesturePatch {
/**
* Disables the fine scrubbing gesture.
* @param tracker The velocity tracker that is used to determine the gesture.
* @param event The motion event that is used to determine the gesture.
*/
public static void disableGesture(VelocityTracker tracker, MotionEvent event) {
if (SettingsEnum.DISABLE_FINE_SCRUBBING_GESTURE.getBoolean()) return;
tracker.addMovement(event);
}
}

View File

@ -170,6 +170,7 @@ public enum SettingsEnum {
EXTERNAL_BROWSER("revanced_external_browser", BOOLEAN, TRUE, true),
AUTO_REPEAT("revanced_auto_repeat", BOOLEAN, FALSE),
SEEKBAR_TAPPING("revanced_seekbar_tapping", BOOLEAN, TRUE),
DISABLE_FINE_SCRUBBING_GESTURE("revanced_disable_fine_scrubbing_gesture", BOOLEAN, TRUE),
SPOOF_SIGNATURE("revanced_spoof_signature_verification_enabled", BOOLEAN, TRUE, true,
"revanced_spoof_signature_verification_enabled_user_dialog_message"),
SPOOF_SIGNATURE_IN_FEED("revanced_spoof_signature_in_feed_enabled", BOOLEAN, FALSE, false,