mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-11 04:27:40 +01:00
also compare by key if the timestamps are the same
This commit is contained in:
parent
757e08c62c
commit
1d9709d4e3
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user