forked from mystiq/hydrogen-web
more stable sorting order for reactions
This commit is contained in:
parent
bb8acbefa3
commit
2eb2e4e9b3
1 changed files with 7 additions and 1 deletions
|
@ -83,7 +83,13 @@ class ReactionViewModel extends ViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
_compare(other) {
|
_compare(other) {
|
||||||
return this._annotation.count - other._annotation.count;
|
const a = this._annotation;
|
||||||
|
const b = other._annotation;
|
||||||
|
if (a.count !== b.count) {
|
||||||
|
return b.count - a.count;
|
||||||
|
} else {
|
||||||
|
return a.firstTimestamp - b.firstTimestamp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleReaction() {
|
toggleReaction() {
|
||||||
|
|
Loading…
Reference in a new issue