File tree 1 file changed +8
-7
lines changed
app/src/main/java/org/fcitx/fcitx5/android/ui/main/settings/addon
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,15 @@ class AddonConfigFragment : FcitxPreferenceFragment() {
16
16
val addon = requireStringArg(ARG_UNIQUE_NAME )
17
17
val raw = fcitx.getAddonConfig(addon)
18
18
if (addon == " table" ) {
19
- val desc = raw[" desc" ][" TableGlobalConfig" ]
20
- val androidTable = RawConfig (
21
- " AndroidTable" , subItems = arrayOf(
22
- RawConfig (" Type" , " External" ),
23
- RawConfig (" Description" , getString(R .string.manage_table_im))
19
+ // append android specific "Manage Table Input Methods" to config of table addon
20
+ raw.findByName(" desc" )?.findByName(" TableGlobalConfig" )?.let {
21
+ it.subItems = (it.subItems ? : emptyArray()) + RawConfig (
22
+ " AndroidTable" , subItems = arrayOf(
23
+ RawConfig (" Type" , " External" ),
24
+ RawConfig (" Description" , getString(R .string.manage_table_im))
25
+ )
24
26
)
25
- )
26
- desc.subItems = (desc.subItems ? : arrayOf()) + androidTable
27
+ }
27
28
}
28
29
return raw
29
30
}
You can’t perform that action at this time.
0 commit comments