mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-14 17:52:10 -04:00
settings: refactor for read-only handling
- Remove default-* copying logic - Allow in-memory changes of settings/session datas - Convert SessionData to newer spec pattern - Migrate weather coords to Session data - Bricks home manager (temporarily)
This commit is contained in:
@@ -214,6 +214,16 @@ function migrateToVersion(obj, targetVersion) {
|
||||
settings.configVersion = 4;
|
||||
}
|
||||
|
||||
if (currentVersion < 5) {
|
||||
console.info("Migrating settings from version", currentVersion, "to version 5");
|
||||
console.info("Moving sensitive data (weather location, coordinates) to session.json");
|
||||
|
||||
delete settings.weatherLocation;
|
||||
delete settings.weatherCoordinates;
|
||||
|
||||
settings.configVersion = 5;
|
||||
}
|
||||
|
||||
return settings;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user