Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ internal class CachedPageEventFlow<T : Any>(
val downstreamFlow = flow {
// track max event index we've seen to avoid race condition between history and the shared
// stream
var maxEventIndex = Integer.MIN_VALUE
var maxEventIndex = Int.MIN_VALUE
sharedForDownstream
.takeWhile {
// shared flow cannot finish hence we have a special marker to finish it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import kotlinx.coroutines.flow.mapNotNull
* * Sending duplicate values is allowed
*/
internal class ConflatedEventBus<T : Any>(initialValue: T? = null) {
private val state = MutableStateFlow(Pair(Integer.MIN_VALUE, initialValue))
private val state = MutableStateFlow(Pair(Int.MIN_VALUE, initialValue))

val flow = state.mapNotNull { it.second }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,6 @@ public class LegacyPagingSource<Key : Any, Value : Any>(
get() = dataSource.type == POSITIONAL

private companion object {
private const val PAGE_SIZE_NOT_SET = Integer.MIN_VALUE
private const val PAGE_SIZE_NOT_SET = Int.MIN_VALUE
}
}