fix: issue where uncategorised channels don't show

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2023-11-12 21:18:57 +01:00
parent 456830a4fa
commit e2dfb7ecc0
1 changed files with 7 additions and 1 deletions

View File

@ -28,7 +28,13 @@ object ChannelUtils {
val output = mutableListOf<CategorisedChannelList>()
val uncategorised =
server.channels?.filter { c -> server.categories?.none { cat -> cat.channels?.contains(c) == true } == true }
server.channels?.filter { c ->
server.categories?.none { cat ->
cat.channels?.contains(
c
) == true
} ?: true
}
?.mapNotNull {
RevoltAPI.channelCache[it]?.let { it1 ->
CategorisedChannelList.Channel(it1)