diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/ChatroomListKnownFeedFilter.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/ChatroomListKnownFeedFilter.kt index 83543f85e..c14c8a4d8 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/ChatroomListKnownFeedFilter.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/ChatroomListKnownFeedFilter.kt @@ -20,13 +20,11 @@ class ChatroomListKnownFeedFilter(val account: Account) : AdditiveFeedFilter + val privateMessages = knownChatrooms.mapNotNull { it -> it.value .roomMessages .sortedWith(compareBy({ it.createdAt() }, { it.idHex })) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/ChatroomListNewFeedFilter.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/ChatroomListNewFeedFilter.kt index ab3e48e6e..7b3e760fa 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/ChatroomListNewFeedFilter.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/ChatroomListNewFeedFilter.kt @@ -19,12 +19,11 @@ class ChatroomListNewFeedFilter(val account: Account) : AdditiveFeedFilter val me = account.userProfile() val followingKeySet = account.followingKeySet() - val privateChatrooms = account.userProfile().privateChatrooms - val messagingWith = privateChatrooms.filter { + val newChatrooms = me.privateChatrooms.filter { !it.value.senderIntersects(followingKeySet) && !me.hasSentMessagesTo(it.key) && !account.isAllHidden(it.key.users) } - val privateMessages = messagingWith.mapNotNull { it -> + val privateMessages = newChatrooms.mapNotNull { it -> it.value .roomMessages .sortedWith(compareBy({ it.createdAt() }, { it.idHex }))