mirror of
https://github.com/mii443/AzooKeyKanaKanjiConverter.git
synced 2025-12-03 02:58:27 +00:00
Reorder candidates
This commit is contained in:
@@ -635,6 +635,10 @@ import SwiftUtils
|
||||
}
|
||||
emojiCandidates = self.getUniquePredictionCandidate(emojiCandidates, seenCandidates: seenCandidates)
|
||||
|
||||
return zeroHintResults.chained(predictionResults).chained(emojiCandidates.suffix(3)).max(count: 10, sortedBy: {$0.value < $1.value})
|
||||
var results: [PredictionCandidate] = []
|
||||
results.append(contentsOf: emojiCandidates.suffix(3))
|
||||
results.append(contentsOf: predictionResults.max(count: (10 - results.count) / 2, sortedBy: {$0.value < $1.value}))
|
||||
results.append(contentsOf: zeroHintResults.max(count: 10 - results.count, sortedBy: {$0.value < $1.value}))
|
||||
return results
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user