mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 07:41:59 +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
|
// Import Settings functionality
|
||||||
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.text"] inMode:UIDocumentPickerModeImport];
|
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.text"] inMode:UIDocumentPickerModeImport];
|
||||||
documentPicker.allowsMultipleSelection = NO;
|
documentPicker.allowsMultipleSelection = NO;
|
||||||
|
documentPicker.delegate = self;
|
||||||
[settingsViewController presentViewController:documentPicker animated:YES completion:nil];
|
[settingsViewController presentViewController:documentPicker animated:YES completion:nil];
|
||||||
return YES;
|
return YES;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1625,7 +1626,6 @@ NSString *cacheDescription = [NSString stringWithFormat:@"%@", GetCacheSize()];
|
||||||
NSLog(@"Error reading file: %@", error.localizedDescription);
|
NSLog(@"Error reading file: %@", error.localizedDescription);
|
||||||
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:@"Error" message:@"Failed to read the settings file." preferredStyle:UIAlertControllerStyleAlert];
|
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:@"Error" message:@"Failed to read the settings file." preferredStyle:UIAlertControllerStyleAlert];
|
||||||
[errorAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
[errorAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||||
[settingsViewController presentViewController:errorAlert animated:YES completion:nil];
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NSArray *lines = [settingsString componentsSeparatedByString:@"\n"];
|
NSArray *lines = [settingsString componentsSeparatedByString:@"\n"];
|
||||||
|
|
@ -1637,9 +1637,7 @@ NSString *cacheDescription = [NSString stringWithFormat:@"%@", GetCacheSize()];
|
||||||
[[NSUserDefaults standardUserDefaults] setObject:value forKey:key];
|
[[NSUserDefaults standardUserDefaults] setObject:value forKey:key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[settingsViewController reloadData];
|
|
||||||
[[%c(GOOHUDManagerInternal) sharedInstance] showMessageMainThread:[%c(YTHUDMessage) messageWithText:@"Settings imported"]];
|
[[%c(GOOHUDManagerInternal) sharedInstance] showMessageMainThread:[%c(YTHUDMessage) messageWithText:@"Settings imported"]];
|
||||||
SHOW_RELAUNCH_YT_SNACKBAR;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue