fix: unintentional like button detection (#119)

This commit is contained in:
j4k0xb 2022-08-08 18:24:44 +02:00 committed by GitHub
parent 2a6d401df5
commit f64b17869e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,8 +77,15 @@ public class ReturnYouTubeDislike {
if (!isEnabled) return; if (!isEnabled) return;
try { try {
// Contains a pathBuilder string, used to distinguish from other litho components // Contains a pathBuilder string, used to distinguish from other litho components:
if (!conversionContext.toString().contains("dislike_button")) return; // video_action_bar.eml|27b56b54d5dcba20|video_action_bar_unwrapper.eml|c5a1d399b660e52e|CellType
// |ScrollableContainerType|ContainerType|ContainerType|dislike_button.eml|966ee2cd7db5e29f
// |video_actipathBuilder=video_action_bar.eml|27b56b54d5dcba20|video_action_bar_unwrapper.eml
// |c5a1d399b660e52e|CellType|ScrollableContainerType|ContainerType|ContainerType|dislike_button.eml
// |966ee2cd7db5e29f|video_action_toggle_button.eml|8fd9d44a8e3c9162|video_action_button.eml
// |9dd3b4b44979c3af|ContainerType|TextType|on_toggle_button.eml|8fd9d44a8e3c9162|video_action_button.eml
// |9dd3b4b44979c3af|ContainerType|TextType|
if (!conversionContext.toString().contains("|dislike_button.eml|")) return;
LogHelper.debug(ReturnYouTubeDislike.class, "dislike button was created"); LogHelper.debug(ReturnYouTubeDislike.class, "dislike button was created");