pull/722/head
Vitor Pamplona 2023-12-14 18:56:53 -05:00
rodzic dd8904de15
commit 7cf7c9f082
2 zmienionych plików z 5 dodań i 8 usunięć

Wyświetl plik

@ -20,13 +20,11 @@ class ChatroomListKnownFeedFilter(val account: Account) : AdditiveFeedFilter<Not
val me = account.userProfile()
val followingKeySet = account.followingKeySet()
val messagingWith = me.privateChatrooms.filter {
(
it.value.senderIntersects(followingKeySet) || me.hasSentMessagesTo(it.key)
) && !account.isAllHidden(it.key.users)
val knownChatrooms = me.privateChatrooms.filter {
(it.value.senderIntersects(followingKeySet) || me.hasSentMessagesTo(it.key)) && !account.isAllHidden(it.key.users)
}
val privateMessages = messagingWith.mapNotNull { it ->
val privateMessages = knownChatrooms.mapNotNull { it ->
it.value
.roomMessages
.sortedWith(compareBy({ it.createdAt() }, { it.idHex }))

Wyświetl plik

@ -19,12 +19,11 @@ class ChatroomListNewFeedFilter(val account: Account) : AdditiveFeedFilter<Note>
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 }))