Skip to content

Commit

Permalink
Fix history items not correctly filtered
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisBarreiro committed Apr 30, 2024
1 parent 66c4a75 commit 08fb26f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class AutoCompleteApi @Inject constructor(
getHistoryResults(query),
) { bookmarksAndFavorites, historyItems ->
val searchHistory = historyItems.filter { it.suggestion is AutoCompleteHistorySearchSuggestion }
val navigationHistory = historyItems.filterIsInstance<RankedSuggestion<AutoCompleteHistorySuggestion>>()
val navigationHistory = historyItems.filter { it.suggestion is AutoCompleteHistorySuggestion } as List<RankedSuggestion<AutoCompleteHistorySuggestion>>
(removeDuplicates(navigationHistory, bookmarksAndFavorites) + searchHistory).sortedByDescending { it.score }.map { it.suggestion }
}

Expand Down

0 comments on commit 08fb26f

Please sign in to comment.