forked from mystiq/hydrogen-web
also compare by key if the timestamps are the same
This commit is contained in:
parent
757e08c62c
commit
1d9709d4e3
1 changed files with 6 additions and 1 deletions
|
@ -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…
Reference in a new issue