From 5dc0e98054aed1e9264f3a88bdcdceb7a2f54ddf Mon Sep 17 00:00:00 2001 From: Bnyro Date: Wed, 25 Sep 2024 13:32:24 +0200 Subject: [PATCH] fix: crash when adding/removing channel to group --- .../libretube/ui/adapters/AddChannelToGroupAdapter.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/adapters/AddChannelToGroupAdapter.kt b/app/src/main/java/com/github/libretube/ui/adapters/AddChannelToGroupAdapter.kt index ceb5d20b8..6b4b7c6bb 100644 --- a/app/src/main/java/com/github/libretube/ui/adapters/AddChannelToGroupAdapter.kt +++ b/app/src/main/java/com/github/libretube/ui/adapters/AddChannelToGroupAdapter.kt @@ -28,12 +28,10 @@ class AddChannelToGroupAdapter( groupCheckbox.setOnCheckedChangeListener { _, isChecked -> if (isChecked) { - channelGroup.channels = channelGroup.channels + channelId + channelGroup.channels += channelId } else { - channelGroup.channels = channelGroup.channels - channelId + channelGroup.channels -= channelId } - - notifyItemChanged(position) } } }