mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 15:12:21 +00:00
Added cleanup for old preferences values
This commit is contained in:
@@ -49,6 +49,7 @@ NSString *const kMPSettingsKeyCopyGeneratedPasswordToClipboard = @"CopyGenerated
|
||||
}
|
||||
|
||||
+ (void)migrateDefaults {
|
||||
[self _removeObsolteValues];
|
||||
[self _fixEntryTableSortDescriptors];
|
||||
}
|
||||
|
||||
@@ -83,6 +84,13 @@ NSString *const kMPSettingsKeyCopyGeneratedPasswordToClipboard = @"CopyGenerated
|
||||
};
|
||||
}
|
||||
|
||||
+ (void)_removeObsolteValues {
|
||||
/* Clear old style values */
|
||||
for(NSString *key in @[ @"kMPSettingsKeyRememberKeyFilesForDatabases", @"MPLastDatabasePath" ]) {
|
||||
[[NSUserDefaults standardUserDefaults] removeObjectForKey:key];
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)_fixEntryTableSortDescriptors {
|
||||
/*
|
||||
MacPass < 0.4 did use compare: for the entry table view,
|
||||
|
||||
Reference in New Issue
Block a user