From 4c78e0d92a4a58e5175b60232e2eb1421a740b2c Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Sun, 12 May 2024 12:09:08 -0500 Subject: [PATCH] Fix https://github.com/arichornlover/uYouEnhanced/issues/603 --- Sources/uYouPlus.xm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 14f4405..529b2f6 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -78,7 +78,19 @@ static int contrastMode() { } %end -// Enable Alternate Icons +// Remove notification badge (App Home Screen) - fixes https://github.com/arichornlover/uYouEnhanced/issues/603 - @arichornlover +%hook UIApplication +- (void)setApplicationIconBadgeNumber:(NSInteger)badgeNumber { // this is a Sideload Fix, not recommended for Jailbroken users. + if ([self respondsToSelector:@selector(setApplicationIconBadgeNumber:)]) { + if ([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.google.ios.youtube"]) { // may break implementation if you modify Bundle ID + badgeNumber = 0; + } + } + %orig(badgeNumber); +} +%end + +// Enable Alternate Icons - @arichornlover %hook UIApplication - (BOOL)supportsAlternateIcons { return YES;