From 089aa0e7863ea0c16f05413001a5f19c3f87caea Mon Sep 17 00:00:00 2001 From: aricloverEXALT <157071384+aricloverEXALT@users.noreply.github.com> Date: Sun, 12 Jan 2025 06:10:41 +0000 Subject: [PATCH] Update uYouPlusSettings.xm --- Sources/uYouPlusSettings.xm | 47 ++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index f319164..fcedec3 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -1598,7 +1598,52 @@ NSString *cacheDescription = [NSString stringWithFormat:@"%@", GetCacheSize()]; SWITCH(LOC(@"STICK_NAVIGATION_BAR"), LOC(@"STICK_NAVIGATION_BAR_DESC"), kStickNavigationBar); SWITCH2(LOC(@"HIDE_ISPONSORBLOCK"), nil, kHideiSponsorBlockButton); SWITCH(LOC(@"HIDE_CHIP_BAR"), LOC(@"HIDE_CHIP_BAR_DESC"), kHideChipBar); - SWITCH(LOC(@"Notifications Tab (Experimental)"), LOC(@"Makes the Notifications Tab appear back onto the Pivot Bar, experimental: The Icon isn't rendering, this will eventually be fixed."), kShowNotificationsTab); + SWITCH2(LOC(@"Enable Notifications Tab"), LOC(@"Makes the Notifications Tab appear back onto the Pivot Bar, experimental: Testing customization options."), kShowNotificationsTab); + YTSettingsSectionItem *notificationIconStyle = [%c(YTSettingsSectionItem) + itemWithTitle:LOC(@"Notifications Tab nostalgic customization") + accessibilityIdentifier:nil + detailTextBlock:^NSString *() { + switch (getNotificationIconStyle()) { + case 1: + return @"Thin Outline (2020+)"; + case 2: + return @"Filled (2018+)"; + case 3: + return @"Classic/Inbox (2014+)"; + case 0: + default: + return @"Default"; + } + } + selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + NSArray *rows = @[ + [YTSettingsSectionItemClass checkmarkItemWithTitle:@"Default" titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:0 forKey:@"notificationIconStyle"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:@"Thin Outline (2020+)" titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"notificationIconStyle"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:@"Filled (2018+)" titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:2 forKey:@"notificationIconStyle"]; + [settingsViewController reloadData]; + return YES; + }], + [YTSettingsSectionItemClass checkmarkItemWithTitle:@"Classic/Inbox (2014+)" titleDescription:nil selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + [[NSUserDefaults standardUserDefaults] setInteger:3 forKey:@"notificationIconStyle"]; + [settingsViewController reloadData]; + return YES; + }] + ]; + YTSettingsPickerViewController *picker = [[%c(YTSettingsPickerViewController) alloc] initWithNavTitle:LOC(@"Notifications Tab nostalgic customization") pickerSectionTitle:nil rows:rows selectedItemIndex:getNotificationIconStyle() parentResponder:[self parentResponder]]; + [settingsViewController pushViewController:picker]; + return YES; + } + ]; + [sectionItems addObject:notificationIconStyle]; SWITCH(LOC(@"HIDE_PLAY_NEXT_IN_QUEUE"), LOC(@"HIDE_PLAY_NEXT_IN_QUEUE_DESC"), kHidePlayNextInQueue); SWITCH2(LOC(@"HIDE_COMMUNITY_POSTS"), LOC(@"HIDE_COMMUNITY_POSTS_DESC"), kHideCommunityPosts); SWITCH2(LOC(@"HIDE_HEADER_LINKS_UNDER_PROFILE"), LOC(@"HIDE_HEADER_LINKS_UNDER_PROFILE_DESC"), kHideChannelHeaderLinks);