Skip to content
Snippets Groups Projects
Commit 39ba3c02 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

account: don't sort empty conversation list

Change-Id: Ie3b898b9efe329ab4b7cbab6eb2988c83bdcbae8
parent f55a70a7
No related branches found
No related tags found
No related merge requests found
...@@ -741,9 +741,11 @@ class Account( ...@@ -741,9 +741,11 @@ class Account(
private fun getSortedConversations(): List<Conversation> { private fun getSortedConversations(): List<Conversation> {
if (conversationsChanged) { if (conversationsChanged) {
sortedConversations.clear() sortedConversations.clear()
if (conversations.isNotEmpty()) {
sortedConversations.addAll(conversations.values) sortedConversations.addAll(conversations.values)
for (c in sortedConversations) c.sortHistory() for (c in sortedConversations) c.sortHistory()
Collections.sort(sortedConversations, ConversationComparator()) Collections.sort(sortedConversations, ConversationComparator())
}
conversationsChanged = false conversationsChanged = false
} }
return sortedConversations return sortedConversations
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment