mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Update
This commit is contained in:
parent
d597049d40
commit
8d4ca25046
2 changed files with 14 additions and 12 deletions
|
@ -598,9 +598,10 @@ class ResultFragmentTv : Fragment() {
|
||||||
setIconResource(drawable)
|
setIconResource(drawable)
|
||||||
setText(text)
|
setText(text)
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
val isSubscribed = viewModel.toggleSubscriptionStatus() ?: return@setOnClickListener
|
viewModel.toggleSubscriptionStatus(context) { newStatus: Boolean? ->
|
||||||
|
if (newStatus == null) return@toggleSubscriptionStatus
|
||||||
|
|
||||||
val message = if (isSubscribed) {
|
val message = if (newStatus) {
|
||||||
// Kinda icky to have this here, but it works.
|
// Kinda icky to have this here, but it works.
|
||||||
SubscriptionWorkManager.enqueuePeriodicWork(context)
|
SubscriptionWorkManager.enqueuePeriodicWork(context)
|
||||||
R.string.subscription_new
|
R.string.subscription_new
|
||||||
|
@ -614,6 +615,7 @@ class ResultFragmentTv : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
observeNullable(viewModel.movie) { data ->
|
observeNullable(viewModel.movie) { data ->
|
||||||
binding?.apply {
|
binding?.apply {
|
||||||
|
|
|
@ -348,7 +348,7 @@ https://developer.android.com/design/ui/tv/samples/jet-fit
|
||||||
style="@style/ResultButtonTV"
|
style="@style/ResultButtonTV"
|
||||||
|
|
||||||
android:nextFocusRight="@id/redirect_to_episodes"
|
android:nextFocusRight="@id/redirect_to_episodes"
|
||||||
android:nextFocusUp="@id/result_favorite_button"
|
android:nextFocusUp="@id/result_subscribe_button"
|
||||||
android:nextFocusDown="@id/result_cast_items"
|
android:nextFocusDown="@id/result_cast_items"
|
||||||
|
|
||||||
android:text="@string/episodes"
|
android:text="@string/episodes"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue