Migrated pads were not displayed instantly in the drive
This commit is contained in:
parent
928dadcf77
commit
e40f43bd20
@ -105,7 +105,7 @@ define([
|
|||||||
var oldFo = FO.init(parsed.drive, {
|
var oldFo = FO.init(parsed.drive, {
|
||||||
Cryptpad: Cryptpad
|
Cryptpad: Cryptpad
|
||||||
});
|
});
|
||||||
var todo = function () {
|
var onMigrated = function () {
|
||||||
oldFo.fixFiles();
|
oldFo.fixFiles();
|
||||||
var newData = Cryptpad.getStore().getProxy();
|
var newData = Cryptpad.getStore().getProxy();
|
||||||
var newFo = newData.fo;
|
var newFo = newData.fo;
|
||||||
@ -151,8 +151,10 @@ define([
|
|||||||
proxy.FS_hashes = [];
|
proxy.FS_hashes = [];
|
||||||
}
|
}
|
||||||
proxy.FS_hashes.push(localStorage.FS_hash);
|
proxy.FS_hashes.push(localStorage.FS_hash);
|
||||||
|
if (typeof(cb) === "function") { cb(); }
|
||||||
};
|
};
|
||||||
oldFo.migrate(todo);
|
oldFo.migrate(onMigrated);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (typeof(cb) === "function") { cb(); }
|
if (typeof(cb) === "function") { cb(); }
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2561,8 +2561,8 @@ define([
|
|||||||
filesOp.pushData(data, function (e, id) {
|
filesOp.pushData(data, function (e, id) {
|
||||||
if (e) { return void console.error("Error while creating the default pad:", e); } // TODO LIMIT?
|
if (e) { return void console.error("Error while creating the default pad:", e); } // TODO LIMIT?
|
||||||
filesOp.add(id);
|
filesOp.add(id);
|
||||||
|
if (typeof(cb) === "function") { cb(); }
|
||||||
});
|
});
|
||||||
if (typeof(cb) === "function") { cb(); }
|
|
||||||
});
|
});
|
||||||
delete sessionStorage.createReadme;
|
delete sessionStorage.createReadme;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user