|
|
@ -138,6 +138,9 @@ define([
|
|
|
|
onLocal();
|
|
|
|
onLocal();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var makeSnapshot = function (title, cb) {
|
|
|
|
var makeSnapshot = function (title, cb) {
|
|
|
|
|
|
|
|
if (state !== STATE.READY) {
|
|
|
|
|
|
|
|
return void cb('NOT_READY');
|
|
|
|
|
|
|
|
}
|
|
|
|
var sframeChan = common.getSframeChannel();
|
|
|
|
var sframeChan = common.getSframeChannel();
|
|
|
|
sframeChan.query("Q_GET_LAST_HASH", null, function (err, obj) {
|
|
|
|
sframeChan.query("Q_GET_LAST_HASH", null, function (err, obj) {
|
|
|
|
if (err || (obj && obj.error)) { return void UI.warn(Messages.error); }
|
|
|
|
if (err || (obj && obj.error)) { return void UI.warn(Messages.error); }
|
|
|
@ -357,6 +360,7 @@ define([
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var setLastMetadata = function (md) {
|
|
|
|
var setLastMetadata = function (md) {
|
|
|
|
if (!unsyncMode) { return; }
|
|
|
|
if (!unsyncMode) { return; }
|
|
|
|
|
|
|
|
if (state !== STATE.READY) { return; }
|
|
|
|
var newContentStr = cpNfInner.chainpad.getAuthDoc();
|
|
|
|
var newContentStr = cpNfInner.chainpad.getAuthDoc();
|
|
|
|
var newContent = JSON.parse(newContentStr);
|
|
|
|
var newContent = JSON.parse(newContentStr);
|
|
|
|
if (Array.isArray(newContent)) {
|
|
|
|
if (Array.isArray(newContent)) {
|
|
|
|