mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
moved variable declaration
This commit is contained in:
parent
30d662522e
commit
e39f97925f
@ -30,7 +30,6 @@ class ChannelFragment : BaseFragment() {
|
|||||||
|
|
||||||
private var channelId: String? = null
|
private var channelId: String? = null
|
||||||
private var channelName: String? = null
|
private var channelName: String? = null
|
||||||
private lateinit var shareData: ShareData
|
|
||||||
private var nextPage: String? = null
|
private var nextPage: String? = null
|
||||||
private var channelAdapter: ChannelAdapter? = null
|
private var channelAdapter: ChannelAdapter? = null
|
||||||
private var isLoading = true
|
private var isLoading = true
|
||||||
@ -103,7 +102,7 @@ class ChannelFragment : BaseFragment() {
|
|||||||
}
|
}
|
||||||
// needed if the channel gets loaded by the ID
|
// needed if the channel gets loaded by the ID
|
||||||
channelId = response.id
|
channelId = response.id
|
||||||
shareData = ShareData(currentChannel = response.name)
|
val shareData = ShareData(currentChannel = response.name)
|
||||||
// fetch and update the subscription status
|
// fetch and update the subscription status
|
||||||
isSubscribed = SubscriptionHelper.isSubscribed(channelId!!)
|
isSubscribed = SubscriptionHelper.isSubscribed(channelId!!)
|
||||||
if (isSubscribed == null) return@launchWhenCreated
|
if (isSubscribed == null) return@launchWhenCreated
|
||||||
@ -126,7 +125,11 @@ class ChannelFragment : BaseFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
binding.channelShare.setOnClickListener {
|
binding.channelShare.setOnClickListener {
|
||||||
val shareDialog = ShareDialog(response.id!!.toID(), ShareObjectType.CHANNEL, shareData)
|
val shareDialog = ShareDialog(
|
||||||
|
response.id!!.toID(),
|
||||||
|
ShareObjectType.CHANNEL,
|
||||||
|
shareData
|
||||||
|
)
|
||||||
shareDialog.show(childFragmentManager, ShareDialog::class.java.name)
|
shareDialog.show(childFragmentManager, ShareDialog::class.java.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user