Skip to content

Commit

Permalink
Fixed search result
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSluffy committed Jul 27, 2024
1 parent fb92d55 commit 4a61cb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ class LawnchairAppSearchAlgorithm(context: Context) : LawnchairSearchAlgorithm(c
val singleAppResult = appResults.firstOrNull()
val shortcuts = singleAppResult?.let { searchUtils.getShortcuts(it, context) }
if (shortcuts != null) {
singleAppResult.let { searchTargets.add(searchTargetFactory.createAppSearchTarget(it, true)) }
if (shortcuts.isNotEmpty()) {
singleAppResult.let { searchTargets.add(searchTargetFactory.createAppSearchTarget(it, true)) }
searchTargets.addAll(shortcuts.map(searchTargetFactory::createShortcutTarget))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ class LawnchairLocalSearchAlgorithm(context: Context) : LawnchairSearchAlgorithm
val singleAppResult = appResults.firstOrNull()
val shortcuts = singleAppResult?.let { searchUtils.getShortcuts(it, context) }
if (shortcuts != null) {
singleAppResult.let { searchTargets.add(searchTargetFactory.createAppSearchTarget(it, true)) }
if (shortcuts.isNotEmpty()) {
singleAppResult.let { searchTargets.add(searchTargetFactory.createAppSearchTarget(it, true)) }
searchTargets.addAll(shortcuts.map(searchTargetFactory::createShortcutTarget))
}
}
Expand Down

0 comments on commit 4a61cb2

Please sign in to comment.