mirror of
https://github.com/recloudstream/cloudstream.git
synced 2025-05-17 19:25:55 +08:00
Add overload method to newHomePageResponse() to allow list of HomePageList
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user