mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-04 23:35:12 +01:00
Fix sorting in search
This commit is contained in:
parent
d225bc9bef
commit
8dd4858612
@ -79,9 +79,7 @@ class GenericAdapter : RecyclerView.Adapter<GenericViewHolder<ViewBinding>>(), F
|
||||
val similarity = (jw.similarity(currentSearchTerm, it) + cos.similarity(currentSearchTerm, it)) / 2
|
||||
if (similarity != 0.0) ScoredItem(similarity, item) else null
|
||||
}
|
||||
}.apply {
|
||||
sortedByDescending { it.score }
|
||||
}
|
||||
}.sortedByDescending { it.score }
|
||||
|
||||
/**
|
||||
* This performs filtering on the items in [allItems] based on similarity to [term]
|
||||
|
Loading…
Reference in New Issue
Block a user