commonMain.ru.astrainteractive.klibs.paging.context.IntPageContext.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of paging-jvm Show documentation
Show all versions of paging-jvm Show documentation
Kotlin Multiplatform paging library
package ru.astrainteractive.klibs.paging.context
/**
* This is default implementation for [Int] page context
*
* @param page is a number of current page
*/
data class IntPageContext(val page: Int) : PageContext {
/**
* This is default factory for generating other contexts from previous
*/
object Factory : PageContext.Factory {
/**
* When next called we will simply increment page number
*/
override fun next(pageContext: IntPageContext): IntPageContext {
return pageContext.copy(page = pageContext.page + 1)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy