mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-05 01:26:23 +00:00
Use Comparator.comparingDouble().
This commit is contained in:
parent
059cfcbad2
commit
d1f3f15478
@ -31,7 +31,7 @@ public class PreferenceFuzzySearchFunction
|
||||
// Specific search - Used for determining order of search results
|
||||
// Calculate a score based on specific search fields
|
||||
.map(item -> new FuzzySearchSpecificDTO(item, keyword))
|
||||
.sorted(Comparator.comparing(FuzzySearchSpecificDTO::getScore).reversed())
|
||||
.sorted(Comparator.comparingDouble(FuzzySearchSpecificDTO::getScore).reversed())
|
||||
.map(FuzzySearchSpecificDTO::getItem)
|
||||
// Limit the amount of search results
|
||||
.limit(20);
|
||||
|
Loading…
Reference in New Issue
Block a user