mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 08:05:29 +03: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
|
val similarity = (jw.similarity(currentSearchTerm, it) + cos.similarity(currentSearchTerm, it)) / 2
|
||||||
if (similarity != 0.0) ScoredItem(similarity, item) else null
|
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]
|
* This performs filtering on the items in [allItems] based on similarity to [term]
|
||||||
|
Loading…
Reference in New Issue
Block a user