@@ -10,8 +10,8 @@ import androidx.preference.PreferenceManager
10
10
import com.osfans.trime.R
11
11
import com.osfans.trime.data.base.DataManager
12
12
import com.osfans.trime.ime.candidates.popup.PopupCandidatesMode
13
+ import com.osfans.trime.ime.core.ComposingTextMode
13
14
import com.osfans.trime.ime.enums.FullscreenMode
14
- import com.osfans.trime.ime.enums.InlinePreeditMode
15
15
import com.osfans.trime.util.appContext
16
16
import java.lang.ref.WeakReference
17
17
@@ -37,6 +37,7 @@ class AppPrefs(
37
37
}
38
38
39
39
val internal = Internal (shared)
40
+ val general = General (shared).register()
40
41
val keyboard = Keyboard (shared)
41
42
val theme = Theme (shared)
42
43
val profile = Profile (shared)
@@ -91,14 +92,23 @@ class AppPrefs(
91
92
var pid by int(PID , 0 )
92
93
}
93
94
95
+ class General (
96
+ shared : SharedPreferences ,
97
+ ) : PreferenceDelegateOwner(shared, R .string.general) {
98
+ companion object {
99
+ const val COMPOSING_TEXT_MODE = " composing_text_mode"
100
+ }
101
+
102
+ val composingTextMode = enum(R .string.composing_text_mode, COMPOSING_TEXT_MODE , ComposingTextMode .DISABLE )
103
+ }
104
+
94
105
/* *
95
106
* Wrapper class of keyboard settings.
96
107
*/
97
108
class Keyboard (
98
109
shared : SharedPreferences ,
99
110
) : PreferenceDelegateOwner(shared) {
100
111
companion object {
101
- const val INLINE_PREEDIT_MODE = " keyboard__inline_preedit"
102
112
const val SOFT_CURSOR_ENABLED = " keyboard__soft_cursor"
103
113
const val POPUP_KEY_PRESS_ENABLED = " keyboard__show_key_popup"
104
114
const val SWITCHES_ENABLED = " keyboard__show_switches"
@@ -134,7 +144,6 @@ class AppPrefs(
134
144
const val REPEAT_INTERVAL = " keyboard__key_repeat_interval"
135
145
}
136
146
137
- var inlinePreedit by enum(INLINE_PREEDIT_MODE , InlinePreeditMode .PREVIEW )
138
147
var fullscreenMode by enum(FULLSCREEN_MODE , FullscreenMode .AUTO_SHOW )
139
148
val softCursorEnabled by bool(SOFT_CURSOR_ENABLED , true )
140
149
val popupKeyPressEnabled by bool(POPUP_KEY_PRESS_ENABLED , false )
0 commit comments