Disconnect other tabs when migrating the drive
This commit is contained in:
@@ -275,7 +275,6 @@ define([
|
||||
&& !drive['filesData']) {
|
||||
Cryptpad.getLegacyPads(function (err, data) {
|
||||
drive[Cryptpad.oldStorageKey] = data;
|
||||
console.log(drive);
|
||||
onReady(f, rt.proxy, Cryptpad, exp);
|
||||
});
|
||||
return;
|
||||
@@ -291,6 +290,15 @@ define([
|
||||
}
|
||||
return;
|
||||
}
|
||||
})
|
||||
.on('change', ['drive'], function () {
|
||||
var path = arguments[2];
|
||||
var value = arguments[1];
|
||||
if (path[1] === "migrate" && value === 1) {
|
||||
rt.network.disconnect();
|
||||
rt.realtime.abort();
|
||||
Cryptpad.alert("Disconnected while migration");
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user