Skip to content

Commit

Permalink
feat(YouTube): Add Disable fine scrubbing gesture patch
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 7, 2023
1 parent 176196b commit 4498f39
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
@@ -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);
}
}
Expand Up @@ -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,
Expand Down

0 comments on commit 4498f39

Please sign in to comment.