From 7a5ff282b6cb27512ca3ba8251fa65290ad85fa4 Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 1 Feb 2019 18:57:19 +0100 Subject: [PATCH] Fix room list display on my account following Ganfra's advices --- .../features/home/room/list/RoomSummaryComparator.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryComparator.kt b/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryComparator.kt index 8d92b694..3c31359a 100644 --- a/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryComparator.kt +++ b/app/src/main/java/im/vector/riotredesign/features/home/room/list/RoomSummaryComparator.kt @@ -41,10 +41,10 @@ class RoomSummaryComparator rightTimestamp = rightRoomSummary.lastMessage?.originServerTs ?: 0 } - if (leftRoomSummary?.lastMessage == null) { - retValue = 1 - } else if (rightRoomSummary?.lastMessage == null) { + if (rightRoomSummary?.lastMessage == null) { retValue = -1 + } else if (leftRoomSummary?.lastMessage == null) { + retValue = 1 } else if (rightHighlightCount > 0 && leftHighlightCount == 0) { retValue = 1 } else if (rightHighlightCount == 0 && leftHighlightCount > 0) {