fix: issues with channel name caused by textIsSelectable

This commit is contained in:
Bnyro 2024-09-05 11:13:52 +02:00
parent 5bd6cc7c44
commit 55bb3dc35f
2 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import com.github.libretube.enums.ShareObjectType
import com.github.libretube.extensions.TAG
import com.github.libretube.extensions.formatShort
import com.github.libretube.extensions.toID
import com.github.libretube.helpers.ClipboardHelper
import com.github.libretube.helpers.ImageHelper
import com.github.libretube.helpers.NavigationHelper
import com.github.libretube.obj.ShareData
@ -193,6 +194,11 @@ class ChannelFragment : DynamicLayoutManagerFragment() {
binding.channelCoordinator.isVisible = true
binding.channelName.text = response.name
binding.channelName.setOnLongClickListener {
ClipboardHelper.save(requireContext(), text = response.name.orEmpty())
true
}
if (response.verified) {
binding.channelName
.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_verified, 0)

View File

@ -67,7 +67,6 @@
android:drawablePadding="3dp"
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="true"
android:textSize="16sp"
android:textStyle="bold"
tools:text="Channel Name" />