Update uYouPlusSettings.xm

This commit is contained in:
arichornlover 2024-06-09 18:58:44 -05:00 committed by GitHub
parent 1e1c4b4dae
commit 57e299f708
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1397,7 +1397,8 @@ extern NSBundle *uYouPlusBundle();
// File Manager (Paste Settings)
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls {
if (urls.count > 0) {
NSString *fileContents = [NSString stringWithContentsOfURL:urls.firstObject encoding:NSUTF8StringEncoding error:nil];
NSURL *fileURL = urls.firstObject;
NSString *fileContents = [NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:nil];
NSArray *lines = [fileContents componentsSeparatedByString:@"\n"];
for (NSString *line in lines) {
NSArray *components = [line componentsSeparatedByString:@": "];
@ -1407,6 +1408,8 @@ extern NSBundle *uYouPlusBundle();
[[NSUserDefaults standardUserDefaults] setObject:value forKey:key];
}
}
[settingsViewController reloadData];
SHOW_RELAUNCH_YT_SNACKBAR;
}
}