From e41d8f7279e8ee8aa75227ccd77cdcb9c7ef28ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=88=9A=28noham=29=C2=B2?= <100566912+NohamR@users.noreply.github.com> Date: Thu, 28 May 2026 00:13:58 +0200 Subject: [PATCH] Prepend 'Infuse Team' to footer and bump version --- Infuse/Infuse-tvOS/Tweak.x | 32 ++++++++++++++++++++++++-------- Infuse/Infuse-tvOS/control | 2 +- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/Infuse/Infuse-tvOS/Tweak.x b/Infuse/Infuse-tvOS/Tweak.x index 59f10fc..c097049 100644 --- a/Infuse/Infuse-tvOS/Tweak.x +++ b/Infuse/Infuse-tvOS/Tweak.x @@ -56,17 +56,33 @@ %end // Add credits -@interface FCVersionView : UIView -@property (nonatomic, strong) UILabel *label; +@interface FCTVSettingsController : UITableViewController +- (UITableView *)tableView; @end -%hook FCVersionView -- (void)awakeFromNib { +%hook FCTVSettingsController +- (void)setUpAppVersionLabel { %orig; - UILabel *label = (UILabel *)[self valueForKey:@"label"]; - if ([label.text containsString:@"Infuse Pro"] && ![label.text hasPrefix:@"Infuse Team •"]) { - label.text = [NSString stringWithFormat:@"Infuse Team • %@", label.text]; - } + + UITableView *tv = [self tableView]; + UILabel *footer = (UILabel *)tv.tableFooterView; + + // Guard: footer is nil/not a UILabel + if (![footer isKindOfClass:[UILabel class]]) return; + + NSAttributedString *current = footer.attributedText; + if (!current.length) return; + + // Handles repeated calls + if ([current.string hasPrefix:@"Infuse Team •"]) return; + + NSDictionary *attrs = [current attributesAtIndex:0 effectiveRange:nil]; + NSMutableAttributedString *mas = [current mutableCopy]; + NSAttributedString *prefix = [[NSAttributedString alloc] + initWithString:@"Infuse Team • " + attributes:attrs]; + [mas insertAttributedString:prefix atIndex:0]; + footer.attributedText = mas; } %end diff --git a/Infuse/Infuse-tvOS/control b/Infuse/Infuse-tvOS/control index 80b47e5..53746bc 100644 --- a/Infuse/Infuse-tvOS/control +++ b/Infuse/Infuse-tvOS/control @@ -1,6 +1,6 @@ Package: io.infuseteam.infuserootless Name: Infuse (Rootless) -Version: 2.0 +Version: 2.1 Architecture: appletvos-arm64 Description: Unlock the full potential of Infuse Maintainer: Infuse Team