drop support for legacy pad list

pull/1/head
ansuz 8 years ago
parent f6125415aa
commit 542d0cd17f

@ -451,24 +451,6 @@ define([
}); });
}; };
// Get the pads from localStorage to migrate them to the object store
common.getLegacyPads = function (cb) {
require(['/customize/store.js'], function(Legacy) { // TODO DEPRECATE_F
Legacy.ready(function (err, legacy) {
if (err) { cb(err, null); return; }
legacy.get(oldStorageKey, function (err2, recentPads) {
if (err2) { cb(err2, null); return; }
if (Array.isArray(recentPads)) {
feedback('MIGRATE_LEGACY_STORE');
cb(void 0, migrateRecentPads(recentPads));
return;
}
cb(void 0, []);
});
});
});
};
// Create untitled documents when no name is given // Create untitled documents when no name is given
var getLocaleDate = common.getLocaleDate = function () { var getLocaleDate = common.getLocaleDate = function () {
if (window.Intl && window.Intl.DateTimeFormat) { if (window.Intl && window.Intl.DateTimeFormat) {

@ -294,10 +294,8 @@ define([
// Creating a new anon drive: import anon pads from localStorage // Creating a new anon drive: import anon pads from localStorage
if ((!drive[Cryptpad.oldStorageKey] || !Cryptpad.isArray(drive[Cryptpad.oldStorageKey])) if ((!drive[Cryptpad.oldStorageKey] || !Cryptpad.isArray(drive[Cryptpad.oldStorageKey]))
&& !drive['filesData']) { && !drive['filesData']) {
Cryptpad.getLegacyPads(function (err, data) { drive[Cryptpad.oldStorageKey] = [];
drive[Cryptpad.oldStorageKey] = data; onReady(f, rt.proxy, Cryptpad, exp);
onReady(f, rt.proxy, Cryptpad, exp);
});
return; return;
} }
// Drive already exist: return the existing drive, don't load data from legacy store // Drive already exist: return the existing drive, don't load data from legacy store

Loading…
Cancel
Save