mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix: hide add to group button when not subscribed
This commit is contained in:
parent
bf33dcd054
commit
d7abfcfe7f
@ -26,9 +26,10 @@ fun TextView.setupSubscriptionButton(
|
||||
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
subscribed = isSubscribed ?: SubscriptionHelper.isSubscribed(channelId)
|
||||
subscribed?.let { subscribed -> onIsSubscribedChange(subscribed) }
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
subscribed?.let { subscribed -> onIsSubscribedChange(subscribed) }
|
||||
|
||||
if (subscribed == true) {
|
||||
this@setupSubscriptionButton.text = context.getString(R.string.unsubscribe)
|
||||
} else {
|
||||
|
@ -160,7 +160,9 @@ class ChannelFragment : DynamicLayoutManagerFragment() {
|
||||
channelId,
|
||||
channelName,
|
||||
binding.notificationBell
|
||||
)
|
||||
) { isSubscribed ->
|
||||
_binding?.addToGroup?.isVisible = isSubscribed
|
||||
}
|
||||
|
||||
binding.channelShare.setOnClickListener {
|
||||
val bundle = bundleOf(
|
||||
|
Loading…
x
Reference in New Issue
Block a user