|
@@ -67,13 +67,23 @@ class InputConnectionController implements TextInputClient {
|
67
|
67
|
void updateRemoteValue(TextEditingValue value) {
|
68
|
68
|
if (!hasConnection) return;
|
69
|
69
|
|
70
|
|
- if (value == _lastKnownRemoteTextEditingValue) return;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+ final actualValue = value.copyWith(
|
|
76
|
+ composing: _lastKnownRemoteTextEditingValue.composing,
|
|
77
|
+ );
|
|
78
|
+
|
|
79
|
+ if (actualValue == _lastKnownRemoteTextEditingValue) return;
|
|
80
|
+
|
71
|
81
|
bool shouldRemember = value.text != _lastKnownRemoteTextEditingValue.text;
|
72
|
|
- _lastKnownRemoteTextEditingValue = value;
|
73
|
|
- _textInputConnection.setEditingState(value);
|
74
|
|
-
|
|
82
|
+ _lastKnownRemoteTextEditingValue = actualValue;
|
|
83
|
+ _textInputConnection.setEditingState(actualValue);
|
75
|
84
|
if (shouldRemember) {
|
76
|
|
- _sentRemoteValues.add(value);
|
|
85
|
+
|
|
86
|
+ _sentRemoteValues.add(actualValue);
|
77
|
87
|
}
|
78
|
88
|
}
|
79
|
89
|
|
|
@@ -103,6 +113,12 @@ class InputConnectionController implements TextInputClient {
|
103
|
113
|
_sentRemoteValues.remove(value);
|
104
|
114
|
return;
|
105
|
115
|
}
|
|
116
|
+
|
|
117
|
+ if (_lastKnownRemoteTextEditingValue == value) {
|
|
118
|
+
|
|
119
|
+ return;
|
|
120
|
+ }
|
|
121
|
+
|
106
|
122
|
|
107
|
123
|
|
108
|
124
|
|