Skip to content

Commit 5ddecd6

Browse files
committed
revert commit paging objects should not be subtypes of List
1 parent f2c5ea2 commit 5ddecd6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/commonMain/kotlin/com.adamratzman.spotify/SpotifyRestAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class SpotifyRestActionPaging<Z : Any, T : AbstractPagingObject<Z>>(api: Spotify
184184
@JvmOverloads
185185
@ExperimentalCoroutinesApi
186186
fun flow(context: CoroutineContext = Dispatchers.Default): Flow<Z> = flow<Z> {
187-
emitAll(flowPagingObjects().flatMapConcat { it.asFlow() })
187+
emitAll(flowPagingObjects().flatMapConcat { it.items.asFlow() })
188188
}.flowOn(context)
189189

190190
/**

src/commonMain/kotlin/com.adamratzman.spotify/models/PagingObjects.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ abstract class AbstractPagingObject<T : Any>(
209209
@Transient open val offset: Int = 0,
210210
@Transient open val previous: String? = null,
211211
@Transient open val total: Int = -1
212-
) {
212+
): List<T> by items {
213213
@Transient
214214
internal var endpoint: SpotifyEndpoint? = null
215215

0 commit comments

Comments
 (0)