From fd8dc7a61d006db23e40c99d34ffa88f4b95c6bf Mon Sep 17 00:00:00 2001 From: qnblackcat Date: Tue, 2 Aug 2022 23:34:25 +0700 Subject: [PATCH] close app button --- Settings.xm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Settings.xm b/Settings.xm index f5f737b..f731f7d 100644 --- a/Settings.xm +++ b/Settings.xm @@ -42,6 +42,15 @@ extern BOOL hidePaidPromotionCard(); YTSettingsViewController *delegate = [self valueForKey:@"_dataDelegate"]; NSBundle *tweakBundle = uYouPlusBundle(); + YTSettingsSectionItem *killApp = [%c(YTSettingsSectionItem) + itemWithTitle:LOC(@"KILL_YOUTUBE") + titleDescription:LOC(@"KILL_YOUTUBE_DESC") + accessibilityIdentifier:nil + detailTextBlock:nil + selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { + exit(0); + }]; + YTSettingsSectionItem *hidePaidPromotionCard = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"HIDE_PAID_PROMOTION_CARDS") titleDescription:LOC(@"HIDE_PAID_PROMOTION_CARDS_DESC")]; hidePaidPromotionCard.hasSwitch = YES; hidePaidPromotionCard.switchVisible = YES; @@ -159,7 +168,7 @@ extern BOOL hidePaidPromotionCard(); return YES; }; - NSMutableArray *sectionItems = [NSMutableArray arrayWithArray:@[autoFull, castConfirm, ytMiniPlayer, hideAutoplaySwitch, hideCC, hideHUD, hidePaidPromotionCard, hidePreviousAndNextButton, hideHoverCard, bigYTMiniPlayer, oledDarkMode, oledKeyBoard, reExplore]]; + NSMutableArray *sectionItems = [NSMutableArray arrayWithArray:@[killApp, autoFull, castConfirm, ytMiniPlayer, hideAutoplaySwitch, hideCC, hideHUD, hidePaidPromotionCard, hidePreviousAndNextButton, hideHoverCard, bigYTMiniPlayer, oledDarkMode, oledKeyBoard, reExplore]]; [delegate setSectionItems:sectionItems forCategory:uYouPlusSection title:@"uYouPlus" titleDescription:nil headerHidden:NO]; }