mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Invoke onWordCommitUserTyped on startInput() with non empty wordcomposer
In chat clients, the last committed word is not committed via rich input connection. This will handle those missed out cases. Change-Id: If3f1f6e1927cdf56a09d3e9124f05c66ca75de53
This commit is contained in:
parent
0e9419d014
commit
6901ea6eac
@ -145,6 +145,13 @@ public final class InputLogic {
|
|||||||
*/
|
*/
|
||||||
public void startInput(final String combiningSpec, final SettingsValues settingsValues) {
|
public void startInput(final String combiningSpec, final SettingsValues settingsValues) {
|
||||||
mEnteredText = null;
|
mEnteredText = null;
|
||||||
|
if (!mWordComposer.getTypedWord().isEmpty()) {
|
||||||
|
// For messaging apps that offer send button, the IME does not get the opportunity
|
||||||
|
// to capture the last word. This block should capture those uncommitted words.
|
||||||
|
// The timestamp at which it is captured is not accurate but close enough.
|
||||||
|
StatsUtils.onWordCommitUserTyped(
|
||||||
|
mWordComposer.getTypedWord(), mWordComposer.isBatchMode());
|
||||||
|
}
|
||||||
mWordComposer.restartCombining(combiningSpec);
|
mWordComposer.restartCombining(combiningSpec);
|
||||||
resetComposingState(true /* alsoResetLastComposedWord */);
|
resetComposingState(true /* alsoResetLastComposedWord */);
|
||||||
mDeleteCount = 0;
|
mDeleteCount = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user