Merge branch 'staging' into offline2

pull/1/head
yflory 4 years ago
commit 7459e17e91

@ -55,12 +55,12 @@
}
}
.cp-app-contacts-spinner {
span.cp-app-contacts-spinner {
display: none;
}
.cp-app-contacts-initializing {
.cp-app-contacts-spinner {
span.cp-app-contacts-spinner {
color: @cp_messenger-fg;
display: block;
}

@ -348,10 +348,7 @@ const getOlderHistory = function (data, cb) {
if (hash === oldestKnownHash) {
found = true;
}
messages.push({
msg: parsed,
hash: hash,
});
messages.push(parsed);
}, function (err) {
var toSend = [];
if (typeof (desiredMessages) === "number") {
@ -359,14 +356,14 @@ const getOlderHistory = function (data, cb) {
} else if (untilHash) {
for (var j = messages.length - 1; j >= 0; j--) {
toSend.unshift(messages[j]);
if (messages[j] && messages[j].hash === untilHash) {
if (Array.isArray(messages[j]) && HK.getHash(messages[j][4]) === untilHash) {
break;
}
}
} else {
let cpCount = 0;
for (var i = messages.length - 1; i >= 0; i--) {
if (/^cp\|/.test(messages[i].msg[4]) && i !== (messages.length - 1)) {
if (/^cp\|/.test(messages[i][4]) && i !== (messages.length - 1)) {
cpCount++;
}
toSend.unshift(messages[i]);

Loading…
Cancel
Save