mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
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())
|
||||
}
|
||||
|
||||
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*/
|
||||
abstract class MainAPI {
|
||||
companion object {
|
||||
|
|
Loading…
Reference in a new issue