0
0
Fork 0
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:
Jason Volk 2018-08-29 20:40:42 -07:00
parent 8cf79948d0
commit 4eef231a27

View file

@ -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;