From 542d0cd17f9f4faf6ba763d84c084447df9fbafc Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 31 Jul 2017 15:34:56 +0200 Subject: [PATCH] drop support for legacy pad list --- www/common/cryptpad-common.js | 18 ------------------ www/common/fsStore.js | 6 ++---- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index b0674f0ef..d9f6e59ef 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -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 var getLocaleDate = common.getLocaleDate = function () { if (window.Intl && window.Intl.DateTimeFormat) { diff --git a/www/common/fsStore.js b/www/common/fsStore.js index 48267e756..ce2c8f0da 100644 --- a/www/common/fsStore.js +++ b/www/common/fsStore.js @@ -294,10 +294,8 @@ define([ // Creating a new anon drive: import anon pads from localStorage if ((!drive[Cryptpad.oldStorageKey] || !Cryptpad.isArray(drive[Cryptpad.oldStorageKey])) && !drive['filesData']) { - Cryptpad.getLegacyPads(function (err, data) { - drive[Cryptpad.oldStorageKey] = data; - onReady(f, rt.proxy, Cryptpad, exp); - }); + drive[Cryptpad.oldStorageKey] = []; + onReady(f, rt.proxy, Cryptpad, exp); return; } // Drive already exist: return the existing drive, don't load data from legacy store