Fix wrong List<T> cast in SearchResult
This commit is contained in:
parent
33778b33dd
commit
d07af511eb
1 changed files with 4 additions and 6 deletions
|
@ -63,7 +63,10 @@ inline fun <T : YouTube.Item> SearchResult(
|
|||
YouTube.search(query, filter, token)
|
||||
}?.map { searchResult ->
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
items = items.plus(searchResult.items as List<T>).distinctBy(YouTube.Item::key)
|
||||
(searchResult.items as List<T>?)?.let {
|
||||
items = items.plus(it).distinctBy(YouTube.Item::key)
|
||||
}
|
||||
|
||||
searchResult.continuation
|
||||
}
|
||||
}
|
||||
|
@ -126,11 +129,6 @@ inline fun <T : YouTube.Item> SearchResult(
|
|||
item {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.pointerInput(Unit) {
|
||||
detectTapGestures {
|
||||
fetch()
|
||||
}
|
||||
}
|
||||
.fillMaxSize()
|
||||
) {
|
||||
BasicText(
|
||||
|
|
Loading…
Reference in a new issue