fix(YouTube - Return YouTube Dislike): Do not load Shorts dislikes if dislike button is hidden

This commit is contained in:
LisoUseInAIKyrios 2024-04-21 18:18:46 +04:00
parent a33516bf4f
commit 7ec945d8d9
1 changed files with 2 additions and 2 deletions

View File

@ -235,7 +235,7 @@ public class ReturnYouTubeDislikePatch {
true, isRollingNumber);
} else if (!isRollingNumber && conversionContextString.contains("|shorts_dislike_button.eml|")) {
// Litho Shorts player.
if (!Settings.RYD_SHORTS.get()) {
if (!Settings.RYD_SHORTS.get() || Settings.HIDE_SHORTS_DISLIKE_BUTTON.get()) {
// Must clear the current video here, otherwise if the user opens a regular video
// then opens a litho short (while keeping the regular video on screen), then closes the short,
// the original video may show the incorrect dislike value.
@ -451,7 +451,7 @@ public class ReturnYouTubeDislikePatch {
if (!Settings.RYD_ENABLED.get()) {
return false;
}
if (!Settings.RYD_SHORTS.get()) {
if (!Settings.RYD_SHORTS.get() || Settings.HIDE_SHORTS_DISLIKE_BUTTON.get()) {
// Must clear the data here, in case a new video was loaded while PlayerType
// suggested the video was not a short (can happen when spoofing to an old app version).
clearData();