Skip to content

Commit

Permalink
fix(YouTube - Return YouTube Dislike): Do not load Shorts dislikes if…
Browse files Browse the repository at this point in the history
… dislike button is hidden
  • Loading branch information
LisoUseInAIKyrios committed Apr 21, 2024
1 parent 5a77baa commit 95ec384
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ private static CharSequence onLithoTextLoaded(@NonNull Object conversionContext,
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.
Expand Down Expand Up @@ -451,7 +451,7 @@ public static boolean setShortsDislikes(@NonNull View likeDislikeView) {
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();
Expand Down

0 comments on commit 95ec384

Please sign in to comment.