fix(search): remove result row fade-in when the query changes
Remove the fade-in animation from result rows so that items render directly when the query changes.
This commit is contained in:
1 parent
cec914ed00
commit
f227546111
1 file changed
-9
@@ -1,6 +1,5 @@
|
||||
package com.example.research.ui.main.components
|
||||
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.*
|
||||
@@ -56,13 +55,6 @@ fun SearchResultsList(
|
||||
val entry = if (showStale) staleEntries.getOrNull(index)
|
||||
else if (index in 0 until results.itemCount) results.peek(index) else null
|
||||
if (entry != null) {
|
||||
Box(
|
||||
modifier = Modifier.animateItem(
|
||||
fadeInSpec = if (index < 8) tween(150) else null,
|
||||
placementSpec = null,
|
||||
fadeOutSpec = null
|
||||
)
|
||||
) {
|
||||
SearchResultItem(
|
||||
entry = entry,
|
||||
resultIndex = index,
|
||||
@@ -71,7 +63,6 @@ fun SearchResultsList(
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
when (results.loadState.append) {
|
||||
is LoadState.Error -> {
|
||||
|
||||
Reference in new issue
Block a user