Skip to content

Commit

Permalink
Navigate to channel on click in channel groups sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed May 8, 2023
1 parent 8cf4f76 commit 01b98a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.github.libretube.databinding.SubscriptionGroupChannelRowBinding
import com.github.libretube.db.obj.SubscriptionGroup
import com.github.libretube.extensions.toID
import com.github.libretube.helpers.ImageHelper
import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.ui.viewholders.SubscriptionGroupChannelRowViewHolder

class SubscriptionGroupChannelsAdapter(
Expand All @@ -30,6 +31,9 @@ class SubscriptionGroupChannelsAdapter(
val channel = channels[position]
val channelId = channel.url.toID()
holder.binding.apply {
root.setOnClickListener {
NavigationHelper.navigateChannel(root.context, channelId)
}
subscriptionChannelName.text = channel.name
ImageHelper.loadImage(channel.avatar, subscriptionChannelImage)
channelIncluded.setOnCheckedChangeListener(null)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/subscription_group_channel_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/rounded_ripple"
android:paddingHorizontal="10dp" >

<com.google.android.material.imageview.ShapeableImageView
Expand Down

0 comments on commit 01b98a0

Please sign in to comment.