Possibly make app search a bit faster again
This commit is contained in:
@@ -247,12 +247,14 @@ internal class AppRepositoryImpl(
|
||||
appResults.addAll(apps)
|
||||
} else {
|
||||
appResults.addAll(apps.mapNotNull {
|
||||
val score = ResultScore(
|
||||
query = query,
|
||||
primaryFields = listOf(it.label),
|
||||
)
|
||||
if (score.score < 0.8f) return@mapNotNull null
|
||||
it.copy(
|
||||
score = ResultScore(
|
||||
query = query,
|
||||
primaryFields = listOf(it.label),
|
||||
)
|
||||
).takeIf { it.score.score >= 0.8f }
|
||||
score = score
|
||||
)
|
||||
})
|
||||
|
||||
val componentName = ComponentName.unflattenFromString(query)
|
||||
|
||||
Reference in New Issue
Block a user