forked from recloudstream/cloudstream
Add overload method to newHomePageResponse() to allow list of HomePageList
This commit is contained in:
parent
ecb2fffe96
commit
e4a5e00ef4
1 changed files with 4 additions and 0 deletions
|
@ -344,6 +344,10 @@ fun newHomePageResponse(list: HomePageList, hasNext: Boolean? = null): HomePageR
|
||||||
return HomePageResponse(listOf(list), hasNext = hasNext ?: list.list.isNotEmpty())
|
return HomePageResponse(listOf(list), hasNext = hasNext ?: list.list.isNotEmpty())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun newHomePageResponse(list: List<HomePageList>, hasNext: Boolean? = null): HomePageResponse {
|
||||||
|
return HomePageResponse(list, hasNext = hasNext ?: list.any { it.list.isNotEmpty() })
|
||||||
|
}
|
||||||
|
|
||||||
/**Every provider will **not** have try catch built in, so handle exceptions when calling these functions*/
|
/**Every provider will **not** have try catch built in, so handle exceptions when calling these functions*/
|
||||||
abstract class MainAPI {
|
abstract class MainAPI {
|
||||||
companion object {
|
companion object {
|
||||||
|
|
Loading…
Reference in a new issue