mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Stop special-casing a single suggestion (A6)
Treat it like the others Change-Id: Ic24e40ada0e75773c3ece9470ab61c350697be5d
This commit is contained in:
parent
251bb70f08
commit
ed83d4b143
@ -221,17 +221,6 @@ public class Suggest {
|
||||
}
|
||||
}
|
||||
|
||||
final ArrayList<SuggestedWordInfo> suggestionsContainer =
|
||||
new ArrayList<SuggestedWordInfo>(suggestionsSet);
|
||||
for (int i = 0; i < suggestionsContainer.size(); ++i) {
|
||||
final SuggestedWordInfo wordInfo = suggestionsContainer.get(i);
|
||||
final SuggestedWordInfo transformedWordInfo = getTransformedSuggestedWordInfo(wordInfo,
|
||||
mLocale, isAllUpperCase, isFirstCharCapitalized, trailingSingleQuotesCount);
|
||||
suggestionsContainer.set(i, transformedWordInfo);
|
||||
LatinImeLogger.onAddSuggestedWord(transformedWordInfo.mWord.toString(),
|
||||
transformedWordInfo.mSourceDict);
|
||||
}
|
||||
|
||||
final CharSequence whitelistedWord =
|
||||
mWhiteListDictionary.getWhitelistedWord(consideredWord);
|
||||
|
||||
@ -253,8 +242,18 @@ public class Suggest {
|
||||
whitelistSuggestion = new SuggestedWordInfo(whitelistedWord,
|
||||
SuggestedWordInfo.MAX_SCORE, SuggestedWordInfo.KIND_WHITELIST,
|
||||
Dictionary.TYPE_WHITELIST);
|
||||
suggestionsContainer.add(0, getTransformedSuggestedWordInfo(whitelistSuggestion,
|
||||
mLocale, isAllUpperCase, isFirstCharCapitalized, trailingSingleQuotesCount));
|
||||
suggestionsSet.add(whitelistSuggestion);
|
||||
}
|
||||
|
||||
final ArrayList<SuggestedWordInfo> suggestionsContainer =
|
||||
new ArrayList<SuggestedWordInfo>(suggestionsSet);
|
||||
for (int i = 0; i < suggestionsContainer.size(); ++i) {
|
||||
final SuggestedWordInfo wordInfo = suggestionsContainer.get(i);
|
||||
final SuggestedWordInfo transformedWordInfo = getTransformedSuggestedWordInfo(wordInfo,
|
||||
mLocale, isAllUpperCase, isFirstCharCapitalized, trailingSingleQuotesCount);
|
||||
suggestionsContainer.set(i, transformedWordInfo);
|
||||
LatinImeLogger.onAddSuggestedWord(transformedWordInfo.mWord.toString(),
|
||||
transformedWordInfo.mSourceDict);
|
||||
}
|
||||
|
||||
if (!isPrediction) {
|
||||
|
Loading…
Reference in New Issue
Block a user