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
05f62a42c6
commit
4b8fce960e
1 file changed
+6
-15
@@ -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,20 +55,12 @@ 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,
|
||||
onArticleClick = onArticleClick,
|
||||
showDictionaryName = showDictionaryName
|
||||
)
|
||||
}
|
||||
SearchResultItem(
|
||||
entry = entry,
|
||||
resultIndex = index,
|
||||
onArticleClick = onArticleClick,
|
||||
showDictionaryName = showDictionaryName
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user