From 006ce94a5b887fc71ab1af93b3e0cbfdcc380130 Mon Sep 17 00:00:00 2001 From: Foxster Date: Fri, 22 Dec 2023 20:01:47 -0800 Subject: [PATCH] Update version cell --- .../uYouPlus.bundle/en.lproj/Localizable.strings | 2 +- Sources/Settings.xm | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings b/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings index 7e8984b..b1b55c4 100644 --- a/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings +++ b/Localizations/uYouPlus.bundle/en.lproj/Localizable.strings @@ -1,5 +1,5 @@ // Settings -"VERSION" = "uYouPlus's version: %@"; +"VERSION" = "Version"; "VERSION_CHECK" = "Tap to check for updates!"; // Video player options diff --git a/Sources/Settings.xm b/Sources/Settings.xm index 8d3d592..0592307 100644 --- a/Sources/Settings.xm +++ b/Sources/Settings.xm @@ -41,10 +41,12 @@ extern NSBundle *uYouPlusBundle(); YTSettingsViewController *settingsViewController = [self valueForKey:@"_settingsViewControllerDelegate"]; YTSettingsSectionItem *version = [%c(YTSettingsSectionItem) - itemWithTitle:[NSString stringWithFormat:LOC(@"VERSION"), @(OS_STRINGIFY(TWEAK_VERSION))] - titleDescription:LOC(@"VERSION_CHECK") + itemWithTitle:LOC(@"VERSION") + titleDescription:nil accessibilityIdentifier:nil - detailTextBlock:nil + detailTextBlock:^NSString *() { + return [[NSString stringWithFormat:@"v%@", @(OS_STRINGIFY(TWEAK_VERSION))] stringByReplacingOccurrencesOfString:@"\"" withString:@""]; + } selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { return [%c(YTUIUtils) openURL:[NSURL URLWithString:@"https://github.com/qnblackcat/uYouPlus/releases/latest"]]; }];