From 20b23ee9d19c8d1ec8f6b1f85e90f352f418d6e1 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 18 Sep 2020 18:01:52 +0200 Subject: [PATCH] Move OO history out of normal history module --- www/common/sframe-common-history.js | 27 --------------------------- 1 file changed, 27 deletions(-) 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;