fix(youtube/hide-player-buttons): fix previous/next button showing if previous video exists (#412)

This commit is contained in:
LisoUseInAIKyrios 2023-05-25 21:33:30 +04:00 committed by GitHub
parent 301a0327bc
commit 60f25a2af0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,16 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public final class HidePlayerButtonsPatch {
public static boolean hideButtons() {
return SettingsEnum.HIDE_PLAYER_BUTTONS.getBoolean();
/**
* Injection point.
*/
public static boolean previousOrNextButtonIsVisible(boolean previousOrNextButtonVisible) {
if (SettingsEnum.HIDE_PLAYER_BUTTONS.getBoolean()) {
return false;
}
return previousOrNextButtonVisible;
}
}