mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-19 09:52:05 +00:00
option to show FLEX
This commit is contained in:
parent
5735a3c084
commit
d600205c32
3 changed files with 27 additions and 4 deletions
9
Makefile
9
Makefile
|
|
@ -1,5 +1,4 @@
|
|||
TARGET = iphone:clang:15.5:14.0
|
||||
uYouPlus_USE_FLEX = 0
|
||||
uYouPlus_USE_FISHHOOK = 0
|
||||
ARCHS = arm64
|
||||
MODULES = jailed
|
||||
|
|
@ -10,12 +9,14 @@ PACKAGE_VERSION = 18.01.6-2.3~1
|
|||
TWEAK_NAME = uYouPlus
|
||||
DISPLAY_NAME = YouTube
|
||||
BUNDLE_ID = com.google.ios.youtube
|
||||
|
||||
|
||||
EXTRA_CFLAGS := $(addprefix -I,$(shell find Tweaks/FLEX -name '*.h' -exec dirname {} \;))
|
||||
|
||||
uYouPlus_INJECT_DYLIBS = Tweaks/uYou/Library/MobileSubstrate/DynamicLibraries/uYou.dylib .theos/obj/libcolorpicker.dylib .theos/obj/iSponsorBlock.dylib .theos/obj/YTUHD.dylib .theos/obj/YouPiP.dylib .theos/obj/YouTubeDislikesReturn.dylib .theos/obj/YTABConfig.dylib
|
||||
uYouPlus_FILES = uYouPlus.xm Settings.xm
|
||||
uYouPlus_FILES = uYouPlus.xm Settings.xm $(shell find Tweaks/FLEX -type f \( -iname \*.c -o -iname \*.m -o -iname \*.mm \))
|
||||
uYouPlus_IPA = tmp/Payload/YouTube.app
|
||||
uYouPlus_FRAMEWORKS = UIKit Security
|
||||
uYouPlus_CFLAGS = -fobjc-arc -DTWEAK_VERSION=$(PACKAGE_VERSION)
|
||||
uYouPlus_CFLAGS = -fobjc-arc -Wno-deprecated-declarations -Wno-unsupported-availability-guard -DTWEAK_VERSION=$(PACKAGE_VERSION) $(EXTRA_CFLAGS)
|
||||
|
||||
include $(THEOS)/makefiles/common.mk
|
||||
include $(THEOS_MAKE_PATH)/tweak.mk
|
||||
|
|
|
|||
10
Settings.xm
10
Settings.xm
|
|
@ -369,6 +369,16 @@ extern NSBundle *uYouPlusBundle();
|
|||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"ENABLE_FLEX")
|
||||
titleDescription:LOC(@"ENABLE_FLEX_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
switchOn:IsEnabled(@"flex_enabled")
|
||||
switchBlock:^BOOL (YTSettingsCell *cell, BOOL enabled) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"flex_enabled"];
|
||||
return YES;
|
||||
}
|
||||
settingItemId:0],
|
||||
|
||||
[YTSettingsSectionItemClass switchItemWithTitle:LOC(@"FIX_GOOGLE_SIGNIN")
|
||||
titleDescription:LOC(@"FIX_GOOGLE_SIGNIN_DESC")
|
||||
accessibilityIdentifier:nil
|
||||
|
|
|
|||
12
uYouPlus.xm
12
uYouPlus.xm
|
|
@ -5,6 +5,7 @@
|
|||
#import <sys/utsname.h>
|
||||
#import <substrate.h>
|
||||
#import "Header.h"
|
||||
#import "Tweaks/FLEX/FLEX.h"
|
||||
#import "Tweaks/YouTubeHeader/YTVideoQualitySwitchOriginalController.h"
|
||||
#import "Tweaks/YouTubeHeader/YTPlayerViewController.h"
|
||||
#import "Tweaks/YouTubeHeader/YTWatchController.h"
|
||||
|
|
@ -193,8 +194,19 @@ static BOOL didFinishLaunching;
|
|||
didFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey, id> *)launchOptions {
|
||||
didFinishLaunching = %orig;
|
||||
self.downloadsVC = [self.downloadsVC init];
|
||||
|
||||
if (IsEnabled(@"flex_enabled")) {
|
||||
[[FLEXManager sharedManager] showExplorer];
|
||||
}
|
||||
|
||||
return didFinishLaunching;
|
||||
}
|
||||
- (void)appWillResignActive:(id)arg1 {
|
||||
%orig;
|
||||
if (IsEnabled(@"flex_enabled")) {
|
||||
[[FLEXManager sharedManager] showExplorer];
|
||||
}
|
||||
}
|
||||
%end
|
||||
|
||||
%hook DownloadsPagerVC
|
||||
|
|
|
|||
Loading…
Reference in a new issue