Merge pull request #1315 from therealFoxster/main

Update DontEatMyContent + reenable uYou appearance patch
This commit is contained in:
Foxster 2024-02-19 19:52:31 -08:00 committed by GitHub
commit 707c84608e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 58 additions and 58 deletions

View file

@ -116,63 +116,63 @@
%end %end
// Fix uYou's appearance not updating if the app is backgrounded // Fix uYou's appearance not updating if the app is backgrounded
// DownloadsPagerVC *downloadsPagerVC; static DownloadsPagerVC *downloadsPagerVC;
// NSUInteger selectedTabIndex; static NSUInteger selectedTabIndex;
// static void refreshUYouAppearance() { %hook DownloadsPagerVC
// if (!downloadsPagerVC) return; - (id)init {
// // View pager downloadsPagerVC = %orig;
// [downloadsPagerVC updatePageStyles]; return downloadsPagerVC;
// // Views }
// for (UIViewController *vc in [downloadsPagerVC viewControllers]) { - (void)viewPager:(id)viewPager didChangeTabToIndex:(NSUInteger)arg1 fromTabIndex:(NSUInteger)arg2 {
// if ([vc isKindOfClass:%c(DownloadingVC)]) { %orig; selectedTabIndex = arg1;
// // `Downloading` view }
// [(DownloadingVC *)vc updatePageStyles]; %end
// for (UITableViewCell *cell in [(DownloadingVC *)vc tableView].visibleCells) static void refreshUYouAppearance() {
// if ([cell isKindOfClass:%c(DownloadingCell)]) if (!downloadsPagerVC) return;
// [(DownloadingCell *)cell updatePageStyles]; // View pager
// } [downloadsPagerVC updatePageStyles];
// else if ([vc isKindOfClass:%c(DownloadedVC)]) { // Views
// // `All`, `Audios`, `Videos`, `Shorts` views for (UIViewController *vc in [downloadsPagerVC viewControllers]) {
// [(DownloadedVC *)vc updatePageStyles]; if ([vc isKindOfClass:%c(DownloadingVC)]) {
// for (UITableViewCell *cell in [(DownloadedVC *)vc tableView].visibleCells) // `Downloading` view
// if ([cell isKindOfClass:%c(DownloadedCell)]) [(DownloadingVC *)vc updatePageStyles];
// [(DownloadedCell *)cell updatePageStyles]; for (UITableViewCell *cell in [(DownloadingVC *)vc tableView].visibleCells)
// } if ([cell isKindOfClass:%c(DownloadingCell)])
// } [(DownloadingCell *)cell updatePageStyles];
// // View pager tabs }
// for (UIView *subview in [downloadsPagerVC view].subviews) { else if ([vc isKindOfClass:%c(DownloadedVC)]) {
// if ([subview isKindOfClass:[UIScrollView class]]) { // `All`, `Audios`, `Videos`, `Shorts` views
// UIScrollView *tabs = (UIScrollView *)subview; [(DownloadedVC *)vc updatePageStyles];
// NSUInteger i = 0; for (UITableViewCell *cell in [(DownloadedVC *)vc tableView].visibleCells)
// for (UIView *item in tabs.subviews) { if ([cell isKindOfClass:%c(DownloadedCell)])
// if ([item isKindOfClass:[UILabel class]]) { [(DownloadedCell *)cell updatePageStyles];
// // Tab label }
// UILabel *tabLabel = (UILabel *)item; }
// if (i == selectedTabIndex) {} // Selected tab should be excluded // View pager tabs
// else [tabLabel setTextColor:[UILabel _defaultColor]]; for (UIView *subview in [downloadsPagerVC view].subviews) {
// i++; if ([subview isKindOfClass:[UIScrollView class]]) {
// } UIScrollView *tabs = (UIScrollView *)subview;
// } NSUInteger i = 0;
// } for (UIView *item in tabs.subviews) {
// } if ([item isKindOfClass:[UILabel class]]) {
// } // Tab label
UILabel *tabLabel = (UILabel *)item;
// %hook DownloadsPagerVC if (i == selectedTabIndex) {} // Selected tab should be excluded
// - (instancetype)init { else [tabLabel setTextColor:[UILabel _defaultColor]];
// downloadsPagerVC = %orig; i++;
// return downloadsPagerVC; }
// } }
// - (void)viewPager:(id)viewPager didChangeTabToIndex:(NSUInteger)arg1 fromTabIndex:(NSUInteger)arg2 { }
// %orig; selectedTabIndex = arg1; }
// } }
// %end %hook UIViewController
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
// %hook UIViewController %orig;
// - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection { dispatch_async(dispatch_get_main_queue(), ^{
// %orig; refreshUYouAppearance();
// refreshUYouAppearance(); });
// } }
// %end %end
// Prevent uYou's playback from colliding with YouTube's // Prevent uYou's playback from colliding with YouTube's
%hook PlayerVC %hook PlayerVC

@ -1 +1 @@
Subproject commit 2253bc34fbb8a5f44993578db37024835bbccdd1 Subproject commit 0a68ddc4f78c1c19a0dba03bca426b0f11a98559