Remove migration script for 0.12 to 0.13

This commit is contained in:
juliandescottes 2018-09-18 22:37:56 +02:00 committed by Julian Descottes
parent 99c060f4a7
commit da4156912e
2 changed files with 0 additions and 19 deletions

View File

@ -10,9 +10,6 @@
ns.app = {
init : function () {
// Run preferences migration scripts for version v0.12.0
pskl.UserSettings.migrate_to_v0_12();
/**
* When started from APP Engine, appEngineToken_ (Boolean) should be set on window.pskl
*/

View File

@ -126,20 +126,4 @@
}
}
};
// Migration script for version 11 to version 12. Initialize the GRID_ENABLED pref from
// the current GRID_WIDTH and update the stored grid width to 1 if it was set to 0.
// SHOULD BE REMOVED FOR RELEASE 13.
ns.UserSettings.migrate_to_v0_12 = function () {
var storedGridEnabled = ns.UserSettings.readFromLocalStorage_('GRID_ENABLED');
if (typeof storedGridEnabled === 'undefined' || storedGridEnabled === null) {
var gridWidth = ns.UserSettings.get('GRID_WIDTH');
ns.UserSettings.writeToLocalStorage_('GRID_ENABLED', gridWidth > 0);
}
var storedGridWidth = ns.UserSettings.readFromLocalStorage_('GRID_WIDTH');
if (storedGridWidth === 0) {
ns.UserSettings.writeToLocalStorage_('GRID_WIDTH', 1);
}
};
})();