mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Library/LocalList: enable subscriptions on emulator layout (#702)
This commit is contained in:
parent
138dea88c4
commit
5153a74d4f
1 changed files with 5 additions and 5 deletions
|
@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.syncproviders.SyncIdName
|
||||||
import com.lagradost.cloudstream3.ui.WatchType
|
import com.lagradost.cloudstream3.ui.WatchType
|
||||||
import com.lagradost.cloudstream3.ui.library.ListSorting
|
import com.lagradost.cloudstream3.ui.library.ListSorting
|
||||||
import com.lagradost.cloudstream3.ui.result.txt
|
import com.lagradost.cloudstream3.ui.result.txt
|
||||||
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTvSettings
|
import com.lagradost.cloudstream3.ui.settings.SettingsFragment.Companion.isTrueTvSettings
|
||||||
import com.lagradost.cloudstream3.utils.Coroutines.ioWork
|
import com.lagradost.cloudstream3.utils.Coroutines.ioWork
|
||||||
import com.lagradost.cloudstream3.utils.DataStoreHelper.getAllFavorites
|
import com.lagradost.cloudstream3.utils.DataStoreHelper.getAllFavorites
|
||||||
import com.lagradost.cloudstream3.utils.DataStoreHelper.getAllSubscriptions
|
import com.lagradost.cloudstream3.utils.DataStoreHelper.getAllSubscriptions
|
||||||
|
@ -71,14 +71,14 @@ class LocalList : SyncAPI {
|
||||||
}?.distinctBy { it.first } ?: return null
|
}?.distinctBy { it.first } ?: return null
|
||||||
|
|
||||||
val list = ioWork {
|
val list = ioWork {
|
||||||
val isTv = isTvSettings()
|
val isTrueTv = isTrueTvSettings()
|
||||||
|
|
||||||
val baseMap = WatchType.values().filter { it != WatchType.NONE }.associate {
|
val baseMap = WatchType.values().filter { it != WatchType.NONE }.associate {
|
||||||
// None is not something to display
|
// None is not something to display
|
||||||
it.stringRes to emptyList<SyncAPI.LibraryItem>()
|
it.stringRes to emptyList<SyncAPI.LibraryItem>()
|
||||||
} + mapOf(
|
} + mapOf(
|
||||||
R.string.favorites_list_name to emptyList()
|
R.string.favorites_list_name to emptyList()
|
||||||
) + if (!isTv) {
|
) + if (!isTrueTv) {
|
||||||
mapOf(
|
mapOf(
|
||||||
R.string.subscription_list_name to emptyList()
|
R.string.subscription_list_name to emptyList()
|
||||||
)
|
)
|
||||||
|
@ -96,8 +96,8 @@ class LocalList : SyncAPI {
|
||||||
it.toLibraryItem()
|
it.toLibraryItem()
|
||||||
})
|
})
|
||||||
|
|
||||||
// Don't show subscriptions or favorites on TV
|
// Don't show subscriptions on TV
|
||||||
val result = if (isTv) {
|
val result = if (isTrueTv) {
|
||||||
baseMap + watchStatusMap + favoritesMap
|
baseMap + watchStatusMap + favoritesMap
|
||||||
} else {
|
} else {
|
||||||
val subscriptionsMap = mapOf(R.string.subscription_list_name to getAllSubscriptions().mapNotNull {
|
val subscriptionsMap = mapOf(R.string.subscription_list_name to getAllSubscriptions().mapNotNull {
|
||||||
|
|
Loading…
Reference in a new issue