private fun createChannelItems(channels: List<Channel>, channelMutes: List<ChannelMute>): List<ChannelItemState> { val mutedChannelIds = channelMutes.map { channelMute -> channelMute.channel.cid }.toSet() return channels.map { ChannelItemState(it, it.cid in mutedChannelIds) } }
Creates a list of [ChannelItemState] that represents channel items we show in the list of channels.