From 85c007ce1e82238f5e867baa331f6b9070cb3fe6 Mon Sep 17 00:00:00 2001 From: aricloverEXALT <157071384+aricloverEXALT@users.noreply.github.com> Date: Sun, 12 Jan 2025 07:54:13 -0600 Subject: [PATCH] Update uYouPlus.xm --- Sources/uYouPlus.xm | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index 8f27efd..a19a48f 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -65,27 +65,27 @@ static int getNotificationIconStyle() { %hook YTPivotBarView - (void)setRenderer:(YTIPivotBarRenderer *)renderer { @try { - YTIBrowseEndpoint *endPoint = [[%c(YTIBrowseEndpoint) alloc] init]; - [endPoint setBrowseId:@"FEnotifications_inbox"]; - YTICommand *command = [[%c(YTICommand) alloc] init]; - [command setBrowseEndpoint:endPoint]; + YTIBrowseEndpoint *endPoint = [[%c(YTIBrowseEndpoint) alloc] init]; + [endPoint setBrowseId:@"FEnotifications_inbox"]; + YTICommand *command = [[%c(YTICommand) alloc] init]; + [command setBrowseEndpoint:endPoint]; - YTIPivotBarItemRenderer *itemBar = [[%c(YTIPivotBarItemRenderer) alloc] init]; - [itemBar setPivotIdentifier:@"FEnotifications_inbox"]; - YTIIcon *icon = [itemBar icon]; - [icon setIconType:YT_NOTIFICATIONS]; - [itemBar setNavigationEndpoint:command]; + YTIPivotBarItemRenderer *itemBar = [[%c(YTIPivotBarItemRenderer) alloc] init]; + [itemBar setPivotIdentifier:@"FEnotifications_inbox"]; + YTIIcon *icon = [itemBar icon]; + [icon setIconType:YT_NOTIFICATIONS]; + [itemBar setNavigationEndpoint:command]; - YTIFormattedString *formatString; - if (useInboxStyle()) { - formatString = [%c(YTIFormattedString) formattedStringWithString:@"Inbox"]; - } else { - formatString = [%c(YTIFormattedString) formattedStringWithString:@"Notifications"]; - } - [itemBar setTitle:formatString]; + YTIFormattedString *formatString; + if (getNotificationIconStyle() == 3) { + formatString = [%c(YTIFormattedString) formattedStringWithString:@"Inbox"]; + } else { + formatString = [%c(YTIFormattedString) formattedStringWithString:@"Notifications"]; + } + [itemBar setTitle:formatString]; - YTIPivotBarSupportedRenderers *barSupport = [[%c(YTIPivotBarSupportedRenderers) alloc] init]; - [barSupport setPivotBarItemRenderer:itemBar]; + YTIPivotBarSupportedRenderers *barSupport = [[%c(YTIPivotBarSupportedRenderers) alloc] init]; + [barSupport setPivotBarItemRenderer:itemBar]; NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { if ([evaluatedObject isKindOfClass:[YTIPivotBarSupportedRenderers class]]) {