diff --git a/www/common/sframe-common-history.js b/www/common/sframe-common-history.js index 74a5dd1d7..399357106 100644 --- a/www/common/sframe-common-history.js +++ b/www/common/sframe-common-history.js @@ -54,29 +54,6 @@ define([ }); }; - var cpIndex = 0; - var sortedCp; - if (config.onlyoffice) { - sortedCp = Object.keys(config.onlyoffice).map(Number).sort(function (a, b) { - return a-b; - }); - } - var loadMoreOOHistory = function () { - if (!Array.isArray(sortedCp)) { - return void console.error("Wrong type"); - } - var hashes = config.onlyoffice; - if (!sortedCp.length) { - // XXX no cp - } - var cp = {}; - if (cpIndex < sortedCp.length) { - var idx = sortedCp[sortedCp.length - 1 - cpIndex]; - cp = config.onlyoffice[idx]; - } - config.onLocal(cp); - }; - var allMessages = []; var lastKnownHash; var isComplete = false; @@ -357,10 +334,6 @@ define([ config.onOpen(); } - if (config.onlyoffice) { - return void loadMoreOOHistory(); - } - // Load all the history messages into a new chainpad object loadMoreHistory(config, common, function (err, newRt, isFull) { History.readOnly = common.getMetadataMgr().getPrivateData().readOnly;