From f971c93e2c8730d61014d89923f72ce1a2c24d85 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Wed, 11 Oct 2023 21:52:07 +0300 Subject: [PATCH] simplify --- .../patches/components/ReturnYouTubeDislikeFilterPatch.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/patches/components/ReturnYouTubeDislikeFilterPatch.java b/app/src/main/java/app/revanced/integrations/patches/components/ReturnYouTubeDislikeFilterPatch.java index 17a75fb9bd..9ae60b8e22 100644 --- a/app/src/main/java/app/revanced/integrations/patches/components/ReturnYouTubeDislikeFilterPatch.java +++ b/app/src/main/java/app/revanced/integrations/patches/components/ReturnYouTubeDislikeFilterPatch.java @@ -59,11 +59,9 @@ public static void newPlayerResponseVideoId(String videoId) { return; } synchronized (lastVideoIds) { - if (lastVideoIds.containsKey(videoId)) { - return; + if (lastVideoIds.put(videoId, Boolean.TRUE) == null) { + LogHelper.printDebug(() -> "New video id: " + videoId); } - LogHelper.printDebug(() -> "New video id: " + videoId); - lastVideoIds.put(videoId, Boolean.TRUE); } } catch (Exception ex) { LogHelper.printException(() -> "newPlayerResponseVideoId failure", ex);