mirror of
https://github.com/MacPass/MacPass.git
synced 2026-01-31 13:08:15 +00:00
Added cleanup for old preferences values
This commit is contained in:
@@ -49,6 +49,7 @@ NSString *const kMPSettingsKeyCopyGeneratedPasswordToClipboard = @"CopyGenerated
|
|||||||
}
|
}
|
||||||
|
|
||||||
+ (void)migrateDefaults {
|
+ (void)migrateDefaults {
|
||||||
|
[self _removeObsolteValues];
|
||||||
[self _fixEntryTableSortDescriptors];
|
[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 {
|
+ (void)_fixEntryTableSortDescriptors {
|
||||||
/*
|
/*
|
||||||
MacPass < 0.4 did use compare: for the entry table view,
|
MacPass < 0.4 did use compare: for the entry table view,
|
||||||
|
|||||||
Reference in New Issue
Block a user