mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
feat(YouTube - Navigation bar components): Add missing resource for Cairo notification icon (YouTube 19.34.42+) https://github.com/inotia00/ReVanced_Extended/issues/2553
This commit is contained in:
@ -197,6 +197,8 @@ public class GeneralPatch {
|
||||
|
||||
// region [Hide navigation bar components] patch
|
||||
|
||||
private static final int fillBellCairoBlack = ResourceUtils.getDrawableIdentifier("yt_fill_bell_cairo_black_24");
|
||||
|
||||
private static final Map<NavigationButton, Boolean> shouldHideMap = new EnumMap<>(NavigationButton.class) {
|
||||
{
|
||||
put(NavigationButton.HOME, Settings.HIDE_NAVIGATION_HOME_BUTTON.get());
|
||||
@ -216,6 +218,18 @@ public class GeneralPatch {
|
||||
return Settings.ENABLE_TRANSLUCENT_NAVIGATION_BAR.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection ALL
|
||||
*/
|
||||
public static void setCairoNotificationFilledIcon(EnumMap enumMap, Enum tabActivityCairo) {
|
||||
if (fillBellCairoBlack != 0) {
|
||||
// It's very unlikely, but Google might fix this issue someday.
|
||||
// If so, [fillBellCairoBlack] might already be in enumMap.
|
||||
// That's why 'EnumMap.putIfAbsent()' is used instead of 'EnumMap.put()'.
|
||||
enumMap.putIfAbsent(tabActivityCairo, Integer.valueOf(fillBellCairoBlack));
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean switchCreateWithNotificationButton(boolean original) {
|
||||
return Settings.SWITCH_CREATE_WITH_NOTIFICATIONS_BUTTON.get() || original;
|
||||
}
|
||||
|
Reference in New Issue
Block a user