fix(YouTube - Return YouTube Dislike): Do not replace view count with dislikes

This commit is contained in:
LisoUseInAIKyrios 2024-06-06 12:39:42 +03:00
parent ecd687100c
commit 5f79196692

View File

@ -221,6 +221,10 @@ public class ReturnYouTubeDislikePatch {
String conversionContextString = conversionContext.toString(); String conversionContextString = conversionContext.toString();
if (isRollingNumber && !conversionContextString.contains("video_action_bar.eml|")) {
return original;
}
final CharSequence replacement; final CharSequence replacement;
if (conversionContextString.contains("|segmented_like_dislike_button.eml|")) { if (conversionContextString.contains("|segmented_like_dislike_button.eml|")) {
// Regular video. // Regular video.
@ -289,6 +293,7 @@ public class ReturnYouTubeDislikePatch {
@NonNull String original) { @NonNull String original) {
try { try {
CharSequence replacement = onLithoTextLoaded(conversionContext, original, true); CharSequence replacement = onLithoTextLoaded(conversionContext, original, true);
String replacementString = replacement.toString(); String replacementString = replacement.toString();
if (!replacementString.equals(original)) { if (!replacementString.equals(original)) {
rollingNumberSpan = replacement; rollingNumberSpan = replacement;