Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update androidx.paging to v3.3.0-alpha03 #260

Open
wants to merge 5 commits into
base: main-3.3.0-alpha02
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "upstreams/androidx-main"]
path = upstreams/androidx-main
url = ./
branch = androidx-main-3.3.0-alpha02
branch = androidx-main-3.3.0-alpha03
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
android = "8.5.1"
androidx-activity-compose = "1.9.1"
androidx-appcompat = "1.7.0"
androidx-paging = "3.3.0-alpha02"
androidx-paging = "3.3.0-alpha03"
kotlin = "1.9.24"
kotlinx-coroutines = "1.8.1"
kotlinx-serialization-json = "1.7.1"
Expand Down
2 changes: 1 addition & 1 deletion paging-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,6 @@ Consult the following table for guidance based on which APIs are being used.
| `PagingConfig` | Use `createPagingConfig`. |
| `PagingData.Companion.empty(LoadStates, LoadStates?)` | Pass in the default value yourself. |
| `PagingData.Companion.from(List<T>, LoadStates, LoadStates?)` | Pass in the default value yourself. |
| `PagingDataDiffer` | Pass in the default value yourself. |
| `PagingDataPresenter` | Pass in the default value yourself. |
| `PagingLogger.log(Int, String, Throwable?)` | Pass in the default value yourself. |
| `PagingSourceLoadResultPage` | Use `createPagingSourceLoadResultPage`. |
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ package app.cash.paging
/** @suppress */
// Constructor has default argument values.
@Suppress("NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS")
actual typealias PagingDataDiffer<T> = androidx.paging.PagingDataDiffer<T>

/** @suppress */
actual typealias DifferCallback = androidx.paging.DifferCallback
actual typealias PagingDataPresenter<T> = androidx.paging.PagingDataPresenter<T>

actual typealias DiffingChangePayload = androidx.paging.DiffingChangePayload
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
package app.cash.paging

/** @suppress */
actual typealias NullPaddedList<T> = androidx.paging.NullPaddedList<T>
actual typealias PlaceholderPaddedList<T> = androidx.paging.PlaceholderPaddedList<T>
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ import kotlinx.coroutines.flow.StateFlow
import kotlin.coroutines.CoroutineContext

/** @suppress */
expect abstract class PagingDataDiffer<T : Any>(
differCallback: DifferCallback,
expect abstract class PagingDataPresenter<T : Any>(
/* default = Dispatchers.Main */
mainContext: CoroutineContext,
/* default = null */
cachedPagingData: PagingData<T>?,
) {

abstract suspend fun presentNewList(
previousList: NullPaddedList<T>,
newList: NullPaddedList<T>,
previousList: PlaceholderPaddedList<T>,
newList: PlaceholderPaddedList<T>,
lastAccessedIndex: Int,
onListPresentable: () -> Unit,
): Int?
Expand Down Expand Up @@ -65,13 +64,6 @@ expect abstract class PagingDataDiffer<T : Any>(
fun removeLoadStateListener(listener: (CombinedLoadStates) -> Unit)
}

/** @suppress */
expect interface DifferCallback {
fun onChanged(position: Int, count: Int)
fun onInserted(position: Int, count: Int)
fun onRemoved(position: Int, count: Int)
}

expect enum class DiffingChangePayload {
ITEM_TO_PLACEHOLDER,
PLACEHOLDER_TO_ITEM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
package app.cash.paging

/** @suppress */
expect interface NullPaddedList<T> {
expect interface PlaceholderPaddedList<T> {
val placeholdersBefore: Int
fun getFromStorage(localIndex: Int): T
val placeholdersAfter: Int
val size: Int
val storageCount: Int
val dataCount: Int
fun getItem(index: Int): T
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ package app.cash.paging
/** @suppress */
// Constructor has default argument values.
@Suppress("NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS")
actual typealias PagingDataDiffer<T> = androidx.paging.PagingDataDiffer<T>

/** @suppress */
actual typealias DifferCallback = androidx.paging.DifferCallback
actual typealias PagingDataPresenter<T> = androidx.paging.PagingDataPresenter<T>

actual typealias DiffingChangePayload = androidx.paging.DiffingChangePayload
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
package app.cash.paging

/** @suppress */
actual typealias NullPaddedList<T> = androidx.paging.NullPaddedList<T>
actual typealias PlaceholderPaddedList<T> = androidx.paging.PlaceholderPaddedList<T>
2 changes: 1 addition & 1 deletion upstreams/androidx-main
Submodule androidx-main updated from 9cb4b0 to 616490
Loading