File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
app/src/main/java/com/osfans/trime/core Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -157,20 +157,17 @@ class Rime :
157
157
158
158
private fun handleRimeResponse (response : RimeResponse ) {
159
159
SchemaManager .init (getCurrentRimeSchema())
160
- if (response.status != null ) {
161
- val (item, status) =
162
- response.status.let {
163
- SchemaItem .fromStatus(it) to InputStatus .fromStatus(it)
164
- }
160
+ response.status?.let {
161
+ val status = InputStatus .fromStatus(it)
165
162
inputStatusCached = status
166
- inputStatus = response.status // for compatibility
163
+ inputStatus = it // for compatibility
164
+
165
+ val item = SchemaItem .fromStatus(it)
167
166
if (item != schemaItemCached) {
168
167
schemaItemCached = item
169
168
}
170
169
}
171
- if (response.context != null ) {
172
- inputContext = response.context // for compatibility
173
- }
170
+ response.context?.let { inputContext = it } // for compatibility
174
171
}
175
172
176
173
fun startup (fullCheck : Boolean ) {
You can’t perform that action at this time.
0 commit comments