All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.makeevrserg.mobilex.paging.state.DefaultPagingState.kt Maven / Gradle / Ivy

The newest version!
package com.makeevrserg.mobilex.paging.state

data class DefaultPagingState(
    override val page: T,
    override val isLastPage: Boolean,
    override val isLoading: Boolean,
    private val getNextPage: DefaultPagingState.() -> T
) : PagingState {
    override fun getNextPage(): T {
        return getNextPage.invoke(this)
    }

    override fun copyPagingState(page: T, isLastPage: Boolean, isLoading: Boolean): PagingState {
        return this.copy(
            page = page,
            isLastPage = isLastPage,
            isLoading = isLoading
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy