|
|
@ -584,7 +584,9 @@ define([
|
|
|
|
ooChannel.cpIndex++;
|
|
|
|
ooChannel.cpIndex++;
|
|
|
|
ooChannel.lastHash = hash;
|
|
|
|
ooChannel.lastHash = hash;
|
|
|
|
// Check if a checkpoint is needed
|
|
|
|
// Check if a checkpoint is needed
|
|
|
|
if (ooChannel.cpIndex % CHECKPOINT_INTERVAL === 0) {
|
|
|
|
var lastCp = getLastCp();
|
|
|
|
|
|
|
|
if (common.isLoggedIn() && (ooChannel.cpIndex % CHECKPOINT_INTERVAL === 0 ||
|
|
|
|
|
|
|
|
(ooChannel.cpIndex - lastCp.index) > CHECKPOINT_INTERVAL)) {
|
|
|
|
makeCheckpoint();
|
|
|
|
makeCheckpoint();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Remove my lock
|
|
|
|
// Remove my lock
|
|
|
@ -662,7 +664,7 @@ define([
|
|
|
|
var startOO = function (blob, file) {
|
|
|
|
var startOO = function (blob, file) {
|
|
|
|
if (APP.ooconfig) { return void console.error('already started'); }
|
|
|
|
if (APP.ooconfig) { return void console.error('already started'); }
|
|
|
|
var url = URL.createObjectURL(blob);
|
|
|
|
var url = URL.createObjectURL(blob);
|
|
|
|
var lock = readOnly || !common.isLoggedIn();
|
|
|
|
var lock = readOnly;// || !common.isLoggedIn();
|
|
|
|
|
|
|
|
|
|
|
|
// Config
|
|
|
|
// Config
|
|
|
|
APP.ooconfig = {
|
|
|
|
APP.ooconfig = {
|
|
|
|