Use custom navigation bar notification filled icon (20.39 still needs a bytecode fix)
This commit is contained in:
parent
636bded69c
commit
4d9de1a81a
13 changed files with 33 additions and 10 deletions
|
|
@ -278,13 +278,13 @@ public final class NavigationBar {
|
|||
}
|
||||
|
||||
/**
|
||||
* Use the bundled non cairo filled icon instead of a custom icon.
|
||||
* Use the old non cairo filled icon, which is almost identical to
|
||||
* the what would be the filled cairo icon.
|
||||
* 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,
|
||||
"yt_fill_bell_black_24");
|
||||
"revanced_fill_bell_cairo_black_24");
|
||||
|
||||
/**
|
||||
* Injection point.
|
||||
|
|
@ -292,13 +292,12 @@ public final class NavigationBar {
|
|||
*/
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public static void setCairoNotificationFilledIcon(EnumMap enumMap, Enum tabActivityCairo) {
|
||||
if (fillBellCairoBlack != 0) {
|
||||
// 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");
|
||||
}
|
||||
enumMap.putIfAbsent(tabActivityCairo, fillBellCairoBlack);
|
||||
// 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");
|
||||
}
|
||||
|
||||
enumMap.putIfAbsent(tabActivityCairo, fillBellCairoBlack);
|
||||
}
|
||||
|
||||
public enum NavigationButton {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue