diff --git a/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings index a27e429..2740d1c 100644 --- a/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings @@ -294,6 +294,8 @@ "HIDE_INDICATORS_DESC" = "Hides all Indicators that are currently in the App."; "FIX_CASTING" = "Fix Casting"; "FIX_CASTING_DESC" = "Changes certain A/B flags to fix casting."; +"NEW_SETTINGS_UI" = "Use New Settings UI"; +"NEW_SETTINGS_UI_DESC" = "Enables the new Settings UI with tweak categories."; "DEFAULT" = "Default"; "CUSTOM_COLOR" = "Custom Color"; diff --git a/Sources/uYouPlus.xm b/Sources/uYouPlus.xm index e122fab..27e6060 100644 --- a/Sources/uYouPlus.xm +++ b/Sources/uYouPlus.xm @@ -310,6 +310,7 @@ BOOL isAdString(NSString *description) { - (BOOL)respectDeviceCaptionSetting { return NO; } // YouRememberCaption: https://poomsmart.github.io/repo/depictions/youremembercaption.html - (BOOL)isLandscapeEngagementPanelSwipeRightToDismissEnabled { return YES; } // Swipe right to dismiss the right panel in fullscreen mode - (BOOL)enableModularPlayerBarController { return NO; } // fixes some of the iSponorBlock problems +- (BOOL)mainAppCoreClientEnableCairoSettings { return IS_ENABLED(@"newSettingsUI_enabled"); } // New grouped settings UI %end // Fix Casting: https://github.com/arichornlover/uYouEnhanced/issues/606#issuecomment-2098289942 @@ -1803,4 +1804,8 @@ static BOOL findCell(ASNodeController *nodeController, NSArray *ide if (![allKeys containsObject:@"fixCasting_enabled"]) { [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"fixCasting_enabled"]; } + // Set new grouped settings UI to default enabled + if (![allKeys containsObject:@"newSettingsUI_enabled"]) { + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"newSettingsUI_enabled"]; + } } diff --git a/Sources/uYouPlusSettings.xm b/Sources/uYouPlusSettings.xm index f960dd0..4cb3599 100644 --- a/Sources/uYouPlusSettings.xm +++ b/Sources/uYouPlusSettings.xm @@ -1297,6 +1297,7 @@ extern NSBundle *uYouPlusBundle(); SWITCH_ITEM2(LOC(@"AUTO_HIDE_HOME_INDICATOR"), LOC(@"AUTO_HIDE_HOME_INDICATOR_DESC"), @"autoHideHomeBar_enabled"); SWITCH_ITEM2(LOC(@"HIDE_INDICATORS"), LOC(@"HIDE_INDICATORS_DESC"), @"hideSubscriptionsNotificationBadge_enabled"); SWITCH_ITEM2(LOC(@"FIX_CASTING"), LOC(@"FIX_CASTING_DESC"), @"fixCasting_enabled"); + SWITCH_ITEM2(LOC(@"NEW_SETTINGS_UI"), LOC(@"NEW_SETTINGS_UI_DESC"), @"newSettingsUI_enabled"); SWITCH_ITEM(LOC(@"ENABLE_FLEX"), LOC(@"ENABLE_FLEX_DESC"), @"flex_enabled"); if ([settingsViewController respondsToSelector:@selector(setSectionItems:forCategory:title:icon:titleDescription:headerHidden:)])