更新界面

This commit is contained in:
2024-07-20 16:06:37 +08:00
parent ba1d74f017
commit 82f58d4b9c
16 changed files with 375 additions and 214 deletions

View File

@@ -2,10 +2,10 @@ package com.aiosman.riderpro
import androidx.paging.PagingSource
import androidx.paging.PagingState
import kotlin.math.ceil
import kotlinx.coroutines.delay
import kotlin.math.ceil
internal class TestBackend(
class TestBackend(
private val backendDataList: List<MomentItem>,
private val loadDelay: Long = 500,
) {
@@ -24,7 +24,7 @@ internal class TestBackend(
}
fun getAllData() = TestPagingSource(this, loadDelay)
}
internal class TestPagingSource(
class TestPagingSource(
private val backend: TestBackend,
private val loadDelay: Long,
) : PagingSource<Int, MomentItem>() {