1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-18 05:42:00 +03:00

Implicit read receipts

* Inject implicit read receipts into the timeline
 * Twiddle local echo a bit to make the implicit receipts match the various different stages of local echo.
This commit is contained in:
David Baker
2015-11-05 13:39:03 +00:00
parent 904539df58
commit 0da547a239
3 changed files with 51 additions and 6 deletions

View File

@@ -155,16 +155,18 @@ module.exports.removeElement = function(array, fn, reverse) {
if (reverse) {
for (i = array.length - 1; i >= 0; i--) {
if (fn(array[i], i, array)) {
var removed = array[i];
array.splice(i, 1);
return true;
return removed;
}
}
}
else {
for (i = 0; i < array.length; i++) {
if (fn(array[i], i, array)) {
var removed = array[i];
array.splice(i, 1);
return true;
return removed;
}
}
}