Better reconnect after invalid lastKnownHash

This commit is contained in:
yflory
2020-03-13 17:39:16 +01:00
parent d53e9cff02
commit 578042154e
6 changed files with 66 additions and 32 deletions

View File

@@ -325,6 +325,11 @@ define([
UI.updateLoadingProgress({ state: -1 }, false);
if (toolbar) {
// Check if we have a new chainpad instance
toolbar.resetChainpad(cpNfInner.chainpad);
}
var newPad = false;
if (newContentStr === '') { newPad = true; }
@@ -364,6 +369,9 @@ define([
}).nThen(function () {
stateChange(STATE.READY);
firstConnection = false;
oldContent = undefined;
if (!readOnly) { onLocal(); }
evOnReady.fire(newPad);