From af5cc0f62b709724e661de8220f5c0b89b34886c Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Mon, 23 Jan 2023 15:35:28 +0100 Subject: [PATCH] sort by userId, sorting order needs to be stable --- src/domain/session/room/timeline/tiles/CallTile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/domain/session/room/timeline/tiles/CallTile.js b/src/domain/session/room/timeline/tiles/CallTile.js index 1758e6bb..b762cef4 100644 --- a/src/domain/session/room/timeline/tiles/CallTile.js +++ b/src/domain/session/room/timeline/tiles/CallTile.js @@ -51,7 +51,7 @@ export class CallTile extends SimpleTile { emitChange, mediaRepository: this.getOption("room").mediaRepository })), - ).sortValues((a, b) => a.avatarTitle < b.avatarTitle ? -1 : 1); + ).sortValues((a, b) => a.userId.localeCompare(b.userId)); } get confId() { @@ -118,6 +118,10 @@ class MemberAvatarViewModel extends ViewModel { return this.getOption("member"); } + get userId() { + return this._member.userId; + } + get avatarLetter() { return avatarInitials(this._member.member.name); }