mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
client: Use room.timeline.modified for rooms list sort for now.
This commit is contained in:
parent
8cf79948d0
commit
4eef231a27
1 changed files with 5 additions and 0 deletions
|
@ -189,6 +189,11 @@ mc.rooms.sort.focused = function(rooms)
|
|||
{
|
||||
return rooms.sort((a, b) =>
|
||||
{
|
||||
let at = maybe(() => a.timeline.modified);
|
||||
let bt = maybe(() => b.timeline.modified);
|
||||
if(at && bt)
|
||||
return at > bt? -1: at == bt? 0: 1;
|
||||
|
||||
let af = maybe(() => a.focus.last);
|
||||
let bf = maybe(() => b.focus.last);
|
||||
return af > bf? -1: af == bf? 0: 1;
|
||||
|
|
Loading…
Reference in a new issue