From 39da47e6ee6dcc8f271fbe20b5f80aeb0b74277e Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 20 Oct 2025 10:58:11 +0400 Subject: [PATCH] Use YT notification icon that isn't associated with the navigation bar enum (YT still failed to fixed even after a second icon redesign) --- .../youtube/patches/VersionCheckPatch.java | 2 ++ .../extension/youtube/shared/NavigationBar.java | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/VersionCheckPatch.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/VersionCheckPatch.java index 97749cf75..77d85737b 100644 --- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/VersionCheckPatch.java +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/patches/VersionCheckPatch.java @@ -24,5 +24,7 @@ public class VersionCheckPatch { public static final boolean IS_20_22_OR_GREATER = isVersionOrGreater("20.22.00"); + public static final boolean IS_20_31_OR_GREATER = isVersionOrGreater("20.31.00"); + public static final boolean IS_20_37_OR_GREATER = isVersionOrGreater("20.37.00"); } diff --git a/extensions/youtube/src/main/java/app/revanced/extension/youtube/shared/NavigationBar.java b/extensions/youtube/src/main/java/app/revanced/extension/youtube/shared/NavigationBar.java index 479f7c01a..b53a06122 100644 --- a/extensions/youtube/src/main/java/app/revanced/extension/youtube/shared/NavigationBar.java +++ b/extensions/youtube/src/main/java/app/revanced/extension/youtube/shared/NavigationBar.java @@ -22,6 +22,7 @@ import app.revanced.extension.shared.Logger; import app.revanced.extension.shared.ResourceType; import app.revanced.extension.shared.Utils; import app.revanced.extension.shared.settings.BaseSettings; +import app.revanced.extension.youtube.patches.VersionCheckPatch; import app.revanced.extension.youtube.settings.Settings; @SuppressWarnings("unused") @@ -279,12 +280,13 @@ public final class NavigationBar { /** * Custom cairo notification filled icon to fix unpatched app missing resource. - * Custom icon is modified starting from - * Font Awesome. */ - private static final int fillBellCairoBlack = Utils.getResourceIdentifier( - ResourceType.DRAWABLE, - "revanced_fill_bell_cairo_black_24"); + private static final int fillBellCairoBlack = Utils.getResourceIdentifier(ResourceType.DRAWABLE, + // The bold cairo notification filled icon is present, + // but YT still has not fixed the icon not associated to the enum. + VersionCheckPatch.IS_20_31_OR_GREATER && !Settings.NAVIGATION_BAR_DISABLE_BOLD_ICONS.get() + ? "yt_fill_experimental_bell_vd_theme_24" + : "revanced_fill_bell_cairo_black_24"); /** * Injection point. @@ -294,7 +296,7 @@ public final class NavigationBar { public static void setCairoNotificationFilledIcon(EnumMap enumMap, Enum tabActivityCairo) { // Show a popup informing this fix is no longer needed to those who might care. if (BaseSettings.DEBUG.get() && enumMap.containsKey(tabActivityCairo)) { - Logger.printException(() -> "YouTube fixed the cairo notification icons"); + Logger.printException(() -> "YouTube fixed the notification icons"); } enumMap.putIfAbsent(tabActivityCairo, fillBellCairoBlack);