File tree Expand file tree Collapse file tree 6 files changed +9
-5
lines changed
paging/paging-testing/src/commonMain/kotlin/androidx/paging/testing Expand file tree Collapse file tree 6 files changed +9
-5
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import androidx.paging.testing.LoaderCallback.CallbackType.ON_CHANGED
3333import androidx.paging.testing.LoaderCallback.CallbackType.ON_INSERTED
3434import androidx.paging.testing.LoaderCallback.CallbackType.ON_REMOVED
3535import kotlin.coroutines.CoroutineContext
36+ import kotlin.jvm.JvmSuppressWildcards
3637import kotlinx.coroutines.cancelAndJoin
3738import kotlinx.coroutines.coroutineScope
3839import kotlinx.coroutines.flow.Flow
Original file line number Diff line number Diff line change @@ -25,8 +25,9 @@ import androidx.paging.PagingData
2525import androidx.paging.PagingDataDiffer
2626import androidx.paging.PagingSource
2727import androidx.paging.testing.LoaderCallback.CallbackType.ON_INSERTED
28- import java.util.concurrent.atomic.AtomicInteger
29- import java.util.concurrent.atomic.AtomicReference
28+ import androidx.paging.testing.internal.AtomicInt
29+ import androidx.paging.testing.internal.AtomicRef
30+ import kotlin.jvm.JvmSuppressWildcards
3031import kotlin.math.abs
3132import kotlinx.coroutines.flow.MutableStateFlow
3233import kotlinx.coroutines.flow.filterNotNull
@@ -451,12 +452,12 @@ internal data class Generation(
451452 * Temporarily stores the latest [DifferCallback] to track prepends to the beginning of list.
452453 * Value is reset to null once read.
453454 */
454- val callbackState : AtomicReference <LoaderCallback ?> = AtomicReference (null),
455+ val callbackState : AtomicRef <LoaderCallback ?> = AtomicRef (null),
455456
456457 /* *
457458 * Tracks the last accessed(peeked) index on the differ for this generation
458459 */
459- var lastAccessedIndex : AtomicInteger = AtomicInteger ( )
460+ var lastAccessedIndex : AtomicInt = AtomicInt (0 )
460461)
461462
462463internal data class LoaderCallback (
File renamed without changes.
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import androidx.paging.LoadType.REFRESH
2222import androidx.paging.Pager
2323import androidx.paging.PagingSource
2424import androidx.paging.PagingSourceFactory
25+ import kotlin.jvm.JvmSuppressWildcards
2526import kotlinx.coroutines.CoroutineScope
2627import kotlinx.coroutines.flow.Flow
2728import kotlinx.coroutines.launch
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ import androidx.paging.PagingSource.LoadParams
2828import androidx.paging.PagingSource.LoadResult
2929import androidx.paging.PagingSource.LoadResult.Page.Companion.COUNT_UNDEFINED
3030import androidx.paging.PagingState
31- import java.util.concurrent.atomic.AtomicBoolean
31+ import androidx.paging.testing.internal.AtomicBoolean
32+ import kotlin.jvm.JvmSuppressWildcards
3233import kotlinx.coroutines.sync.Mutex
3334import kotlinx.coroutines.sync.withLock
3435
You can’t perform that action at this time.
0 commit comments