mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Show single word in actionbar during update batch
This commit is contained in:
parent
a0cb585ef6
commit
ea166f2750
@ -17,6 +17,7 @@
|
|||||||
package org.futo.inputmethod.latin;
|
package org.futo.inputmethod.latin;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import static org.futo.inputmethod.latin.define.DecoderSpecificConstants.SHOULD_AUTO_CORRECT_USING_NON_WHITE_LISTED_SUGGESTION;
|
import static org.futo.inputmethod.latin.define.DecoderSpecificConstants.SHOULD_AUTO_CORRECT_USING_NON_WHITE_LISTED_SUGGESTION;
|
||||||
import static org.futo.inputmethod.latin.define.DecoderSpecificConstants.SHOULD_REMOVE_PREVIOUSLY_REJECTED_SUGGESTION;
|
import static org.futo.inputmethod.latin.define.DecoderSpecificConstants.SHOULD_REMOVE_PREVIOUSLY_REJECTED_SUGGESTION;
|
||||||
@ -333,6 +334,7 @@ public final class Suggest {
|
|||||||
&& TextUtils.equals(suggestionsContainer.get(0).mWord,
|
&& TextUtils.equals(suggestionsContainer.get(0).mWord,
|
||||||
wordComposer.getRejectedBatchModeSuggestion())) {
|
wordComposer.getRejectedBatchModeSuggestion())) {
|
||||||
final SuggestedWordInfo rejected = suggestionsContainer.remove(0);
|
final SuggestedWordInfo rejected = suggestionsContainer.remove(0);
|
||||||
|
Log.i(TAG, "Swipe: Swapping top candidate [ " + rejected.mWord + " ] as it was previously rejected by user");
|
||||||
suggestionsContainer.add(1, rejected);
|
suggestionsContainer.add(1, rejected);
|
||||||
}
|
}
|
||||||
SuggestedWordInfo.removeDups(null /* typedWord */, suggestionsContainer);
|
SuggestedWordInfo.removeDups(null /* typedWord */, suggestionsContainer);
|
||||||
|
@ -288,6 +288,20 @@ fun RowScope.SuggestionItems(words: SuggestedWords, onClick: (i: Int) -> Unit, o
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(maxSuggestions == 1 || words.mInputStyle == SuggestedWords.INPUT_STYLE_UPDATE_BATCH) {
|
||||||
|
SuggestionItem(
|
||||||
|
words,
|
||||||
|
0,
|
||||||
|
isPrimary = true,
|
||||||
|
onClick = { onClick(0) },
|
||||||
|
onLongClick = { onLongClick(0) }
|
||||||
|
)
|
||||||
|
|
||||||
|
return
|
||||||
|
} else if(words.mInputStyle == SuggestedWords.INPUT_STYLE_TAIL_BATCH && maxSuggestions > 1) {
|
||||||
|
words.mSuggestedWordInfoList.removeAt(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var offset = 0
|
var offset = 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user