Commit 5b78b88
fix(keyboard): resolve schema name not refreshing when switching input methods after librime update
After the librime update, the schema name displayed on the space key would not refresh when switching input methods. The previous fix in PR #1810 directly set KeyAction.label to the schema name during initialization (when label was empty), using getSpaceKeySchemaName() as a fallback.
However, when users switch input methods at runtime, Rime's status (statusCached.schemaName) changes, but KeyAction.label remains set to the old name and is no longer empty. As a result, getLabel() doesn't re-read getSpaceKeySchemaName(), leaving the interface displaying the old name until a keyboard rebuild or refresh is triggered by another operation.
This change ensures that the space key's label isn't permanently fixed to a specific schema name during initialization, preventing the issue of "old values being cached". Now the schema name will correctly update when users switch input methods.1 parent 2cf90f4 commit 5b78b88
1 file changed
+5
-7
lines changedLines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
118 | 116 | | |
119 | 117 | | |
120 | 118 | | |
| |||
161 | 159 | | |
162 | 160 | | |
163 | 161 | | |
164 | | - | |
| 162 | + | |
165 | 163 | | |
166 | 164 | | |
167 | 165 | | |
| |||
191 | 189 | | |
192 | 190 | | |
193 | 191 | | |
194 | | - | |
| 192 | + | |
195 | 193 | | |
196 | 194 | | |
197 | 195 | | |
| |||
0 commit comments