Fix room list display on my account

following Ganfra's advices
This commit is contained in:
manuroe 2019-02-01 18:57:19 +01:00
parent 30bfada5d2
commit 7a5ff282b6

View file

@ -41,10 +41,10 @@ class RoomSummaryComparator
rightTimestamp = rightRoomSummary.lastMessage?.originServerTs ?: 0 rightTimestamp = rightRoomSummary.lastMessage?.originServerTs ?: 0
} }
if (leftRoomSummary?.lastMessage == null) { if (rightRoomSummary?.lastMessage == null) {
retValue = 1
} else if (rightRoomSummary?.lastMessage == null) {
retValue = -1 retValue = -1
} else if (leftRoomSummary?.lastMessage == null) {
retValue = 1
} else if (rightHighlightCount > 0 && leftHighlightCount == 0) { } else if (rightHighlightCount > 0 && leftHighlightCount == 0) {
retValue = 1 retValue = 1
} else if (rightHighlightCount == 0 && leftHighlightCount > 0) { } else if (rightHighlightCount == 0 && leftHighlightCount > 0) {