diff --git a/src/domain/session/room/timeline/ReactionsViewModel.js b/src/domain/session/room/timeline/ReactionsViewModel.js index 6a813d03..b7426b49 100644 --- a/src/domain/session/room/timeline/ReactionsViewModel.js +++ b/src/domain/session/room/timeline/ReactionsViewModel.js @@ -135,7 +135,12 @@ class ReactionViewModel { const a = this._annotation; const b = other._annotation; if (a && b) { - return a.firstTimestamp - b.firstTimestamp; + const cmp = a.firstTimestamp - b.firstTimestamp; + if (cmp === 0) { + return this.key < other.key ? -1 : 1; + } else { + return cmp; + } } else if (a) { return -1; } else {