Merge pull request #3480 from Bnyro/master

Fix that channel group items get lost on scrolling
This commit is contained in:
Bnyro 2023-04-02 18:49:06 +02:00 committed by GitHub
commit 0689e69d09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)