Fix that channel group items get lost on scrolling

This commit is contained in:
Bnyro 2023-04-02 18:48:48 +02:00
parent 9409b53343
commit 909de96160

View File

@ -32,6 +32,7 @@ class SubscriptionGroupChannelsAdapter(
holder.binding.apply {
subscriptionChannelName.text = channel.name
ImageHelper.loadImage(channel.avatar, subscriptionChannelImage)
channelIncluded.setOnCheckedChangeListener(null)
channelIncluded.isChecked = group.channels.contains(channelId)
channelIncluded.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) group.channels.add(channelId) else group.channels.remove(channelId)