Added date to Exported Settings file
Experimental and Untested. This is something that would be useful to prevent overriding the previous .txt settings file whenever exporting settings again.
This commit is contained in:
parent
d147b294ff
commit
483b294d4f
1 changed files with 3 additions and 1 deletions
|
|
@ -123,7 +123,9 @@ static const NSInteger YTLiteSection = 789;
|
|||
selectBlock:^BOOL (YTSettingsCell *cell, NSUInteger arg1) {
|
||||
if (IS_ENABLED(@"switchCopyandPasteFunctionality_enabled")) {
|
||||
// Export Settings functionality
|
||||
NSURL *tempFileURL = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:@"exported_settings.txt"]];
|
||||
NSString *dateString = [self getCurrentDateAsString];
|
||||
NSString *fileName = [NSString stringWithFormat:@"YTLitePlusSettings_%@", dateString];
|
||||
NSURL *tempFileURL = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:[fileName stringByAppendingString:@".txt"]]];
|
||||
NSMutableString *settingsString = [NSMutableString string];
|
||||
for (NSString *key in copyKeys) {
|
||||
id value = [[NSUserDefaults standardUserDefaults] objectForKey:key];
|
||||
|
|
|
|||
Loading…
Reference in a new issue