forked from ReVanced/revanced-integrations
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(YouTube - Disable precise seeking gesture): Hide "pull up" label…
… that shows up when swiping (ReVanced#696)
- Loading branch information
1 parent
ce9e986
commit 0b9afd0
Showing
1 changed file
with
2 additions
and
12 deletions.
There are no files selected for viewing
14 changes: 2 additions & 12 deletions
14
...ain/java/app/revanced/integrations/youtube/patches/DisablePreciseSeekingGesturePatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,10 @@ | ||
package app.revanced.integrations.youtube.patches; | ||
|
||
import android.view.MotionEvent; | ||
import android.view.VelocityTracker; | ||
|
||
import app.revanced.integrations.youtube.settings.Settings; | ||
|
||
@SuppressWarnings("unused") | ||
public final class DisablePreciseSeekingGesturePatch { | ||
/** | ||
* Disables the gesture that is used to seek precisely. | ||
* @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 (Settings.DISABLE_PRECISE_SEEKING_GESTURE.get()) return; | ||
|
||
tracker.addMovement(event); | ||
public static boolean isGestureDisabled() { | ||
return Settings.DISABLE_PRECISE_SEEKING_GESTURE.get(); | ||
} | ||
} |