mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-19 00:53:57 +00:00
Use YT notification icon that isn't associated with the navigation bar enum (YT still failed to fixed even after a second icon redesign)
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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
|
||||
* <a href="https://fontawesome.com/icons/bell?f=classic&s=solid">Font Awesome</a>.
|
||||
*/
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user