Added Clear Notifications Button (Settings.xm)

a new button that will fix the issue for uYouEnhanced when Sideloading it.

When interacting with this button it should help clear the notifications 🔔 

Fixes #603
This commit is contained in:
arichornlover 2024-05-12 14:35:43 -05:00 committed by GitHub
parent 7e45d1dcc1
commit 5f5230609d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -249,6 +249,19 @@ extern NSBundle *uYouPlusBundle();
];
[sectionItems addObject:appIcon];
YTSettingsSectionItem *clearNotifications = [%c(YTSettingsSectionItem)
itemWithTitle:LOC(@"Clear Notifications")
titleDescription:LOC(@"Force clear all notifications (Recommended if uYouEnhanced is Sideloaded)")
accessibilityIdentifier:nil
detailTextBlock:nil
selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
[[UIApplication sharedApplication] cancelAllLocalNotifications];
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
return YES;
}
];
[sectionItems addObject:clearNotifications];
# pragma mark - App theme
SECTION_HEADER(LOC(@"THEME_OPTIONS"));