mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 08:20:32 +05:30
Merge pull request #3718 from jatzuk/fix_channel_fragment_npe
ChannelFragment NPE fix
This commit is contained in:
commit
f4fdfc5c99
@ -137,8 +137,9 @@ class ChannelFragment : Fragment() {
|
|||||||
fetchChannelNextPage()
|
fetchChannelNextPage()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val channelId = channelId ?: return@repeatOnLifecycle
|
||||||
// fetch and update the subscription status
|
// fetch and update the subscription status
|
||||||
isSubscribed = SubscriptionHelper.isSubscribed(channelId!!)
|
isSubscribed = SubscriptionHelper.isSubscribed(channelId)
|
||||||
if (isSubscribed == null) return@repeatOnLifecycle
|
if (isSubscribed == null) return@repeatOnLifecycle
|
||||||
|
|
||||||
binding.channelSubscribe.setupSubscriptionButton(
|
binding.channelSubscribe.setupSubscriptionButton(
|
||||||
@ -149,7 +150,7 @@ class ChannelFragment : Fragment() {
|
|||||||
|
|
||||||
binding.channelShare.setOnClickListener {
|
binding.channelShare.setOnClickListener {
|
||||||
val shareDialog = ShareDialog(
|
val shareDialog = ShareDialog(
|
||||||
response.id!!.toID(),
|
channelId.toID(),
|
||||||
ShareObjectType.CHANNEL,
|
ShareObjectType.CHANNEL,
|
||||||
shareData
|
shareData
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user