Store URLs in uYouPlusSettings.h (#1409)

This commit is contained in:
Huy
2024-04-13 11:36:32 -07:00
committed by GitHub
parent 329cfcb441
commit f4012ca76a
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -6,6 +6,9 @@
#import <YouTubeHeader/YTSettingsPickerViewController.h> #import <YouTubeHeader/YTSettingsPickerViewController.h>
#import "uYouPlus.h" #import "uYouPlus.h"
NSString *UYOUPLUS_RELEASES_URL = @"https://github.com/qnblackcat/uYouPlus/releases";
NSString *UYOUPLUS_NEW_ISSUE_URL = @"https://github.com/qnblackcat/uYouPlus/issues/new?assignees=&labels=bug&projects=&template=bug.yaml&title=[v%@] %@";
// For displaying snackbars // For displaying snackbars
@interface YTHUDMessage : NSObject @interface YTHUDMessage : NSObject
+ (id)messageWithText:(id)text; + (id)messageWithText:(id)text;
+2 -2
View File
@@ -54,7 +54,7 @@ extern NSBundle *uYouPlusBundle();
return VERSION_STRING; return VERSION_STRING;
} }
selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
return [%c(YTUIUtils) openURL:[NSURL URLWithString:@"https://github.com/qnblackcat/uYouPlus/releases"]]; return [%c(YTUIUtils) openURL:[NSURL URLWithString:UYOUPLUS_RELEASES_URL]];
} }
]; ];
[sectionItems addObject:version]; [sectionItems addObject:version];
@@ -65,7 +65,7 @@ extern NSBundle *uYouPlusBundle();
accessibilityIdentifier:nil accessibilityIdentifier:nil
detailTextBlock:nil detailTextBlock:nil
selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) { selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
NSString *url = [NSString stringWithFormat:@"https://github.com/qnblackcat/uYouPlus/issues/new?assignees=&labels=bug&projects=&template=bug.yaml&title=[v%@] %@", VERSION_STRING, LOC(@"ADD_TITLE")]; NSString *url = [NSString stringWithFormat:UYOUPLUS_NEW_ISSUE_URL, VERSION_STRING, LOC(@"ADD_TITLE")];
return [%c(YTUIUtils) openURL:[NSURL URLWithString:[url stringByReplacingOccurrencesOfString:@" " withString:@"%20"]]]; return [%c(YTUIUtils) openURL:[NSURL URLWithString:[url stringByReplacingOccurrencesOfString:@" " withString:@"%20"]]];
} }