Skip to content

Commit

Permalink
fix: bar could not be hidden correctly with corresponding rime option
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck committed Mar 4, 2024
1 parent c131817 commit 13005b0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/src/main/java/com/osfans/trime/ime/bar/QuickBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class QuickBar(context: Context, service: TrimeInputMethodService) {
{ service.handleKey(KeyEvent.KEYCODE_PAGE_UP, 0) },
{ service.selectLiquidKeyboard(SymbolKeyboardType.CANDIDATE) },
)
visibility = if (Rime.getOption("_hide_candidate")) View.GONE else View.VISIBLE
}
with(candidates) {
setCandidateListener(service.textInputManager)
Expand All @@ -51,6 +50,14 @@ class QuickBar(context: Context, service: TrimeInputMethodService) {

val view by lazy {
ViewAnimator(context).apply {
visibility =
if (Rime.getOption("_hide_candidate") ||
Rime.getOption("_hide_bar")
) {
View.GONE
} else {
View.VISIBLE
}
background =
ColorManager.getDrawable(
"candidate_background",
Expand Down

0 comments on commit 13005b0

Please sign in to comment.