mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-13 20:41:28 +00:00
Update uYouPlusSettings.xm
This commit is contained in:
parent
237ad26bdb
commit
7f240104cd
1 changed files with 6 additions and 2 deletions
|
|
@ -209,10 +209,13 @@ extern NSBundle *uYouPlusBundle();
|
|||
[settingsString appendFormat:@"%@: %@\n", key, value];
|
||||
}
|
||||
}
|
||||
if (settingsString.length > 0) {
|
||||
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.text"] inMode:UIDocumentPickerModeExportToService];
|
||||
documentPicker.delegate = (id<UIDocumentPickerDelegate>)self;
|
||||
documentPicker.allowsMultipleSelection = NO;
|
||||
[settingsViewController presentViewController:documentPicker animated:YES completion:nil];
|
||||
[UIApplication.sharedApplication.keyWindow.rootViewController presentViewController:documentPicker animated:YES completion:nil];
|
||||
}
|
||||
return YES;
|
||||
} else {
|
||||
// Copy Settings functionality (default behavior)
|
||||
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
|
||||
|
|
@ -242,7 +245,8 @@ extern NSBundle *uYouPlusBundle();
|
|||
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.text"] inMode:UIDocumentPickerModeImport];
|
||||
documentPicker.delegate = (id<UIDocumentPickerDelegate>)self;
|
||||
documentPicker.allowsMultipleSelection = NO;
|
||||
[settingsViewController presentViewController:documentPicker animated:YES completion:nil];
|
||||
[UIApplication.sharedApplication.keyWindow.rootViewController presentViewController:documentPicker animated:YES completion:nil];
|
||||
return YES;
|
||||
} else {
|
||||
// Paste Settings functionality (default behavior)
|
||||
UIAlertController *confirmPasteAlert = [UIAlertController alertControllerWithTitle:LOC(@"CONFIRM_PASTE_TITLE") message:LOC(@"CONFIRM_PASTE_MESSAGE") preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
|
|
|||
Loading…
Reference in a new issue