mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 21:26:04 +00:00
Update uYouPlusSettings.xm
This commit is contained in:
parent
7e79ac2e80
commit
bf48c76b98
1 changed files with 1 additions and 3 deletions
|
|
@ -250,6 +250,7 @@ extern NSBundle *uYouPlusBundle();
|
|||
// Import Settings functionality
|
||||
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.text"] inMode:UIDocumentPickerModeImport];
|
||||
documentPicker.allowsMultipleSelection = NO;
|
||||
documentPicker.delegate = self;
|
||||
[settingsViewController presentViewController:documentPicker animated:YES completion:nil];
|
||||
return YES;
|
||||
} else {
|
||||
|
|
@ -1625,7 +1626,6 @@ NSString *cacheDescription = [NSString stringWithFormat:@"%@", GetCacheSize()];
|
|||
NSLog(@"Error reading file: %@", error.localizedDescription);
|
||||
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:@"Error" message:@"Failed to read the settings file." preferredStyle:UIAlertControllerStyleAlert];
|
||||
[errorAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||
[settingsViewController presentViewController:errorAlert animated:YES completion:nil];
|
||||
return;
|
||||
}
|
||||
NSArray *lines = [settingsString componentsSeparatedByString:@"\n"];
|
||||
|
|
@ -1637,9 +1637,7 @@ NSString *cacheDescription = [NSString stringWithFormat:@"%@", GetCacheSize()];
|
|||
[[NSUserDefaults standardUserDefaults] setObject:value forKey:key];
|
||||
}
|
||||
}
|
||||
[settingsViewController reloadData];
|
||||
[[%c(GOOHUDManagerInternal) sharedInstance] showMessageMainThread:[%c(YTHUDMessage) messageWithText:@"Settings imported"]];
|
||||
SHOW_RELAUNCH_YT_SNACKBAR;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue