From 764cd882d2980bc734cf9ed9f0b1d74e552474aa Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Thu, 29 Dec 2022 12:43:02 +0100 Subject: [PATCH] Fix inaccessible text layout from pin The "main" layout can now be pin layout. 'SWITCH_TEXT' and 'SWITCH_SECOND_BACK' don't mean to use that. --- srcs/juloo.keyboard2/KeyEventHandler.java | 4 ++-- srcs/juloo.keyboard2/Keyboard2.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java index 9062555..9be23c5 100644 --- a/srcs/juloo.keyboard2/KeyEventHandler.java +++ b/srcs/juloo.keyboard2/KeyEventHandler.java @@ -45,7 +45,7 @@ class KeyEventHandler implements Config.IKeyEventHandler { case CONFIG: _recv.showKeyboardConfig(); break; case SWITCH_TEXT: - case SWITCH_SECOND_BACK: _recv.switch_main(); break; + case SWITCH_SECOND_BACK: _recv.switch_text(); break; case SWITCH_NUMERIC: _recv.switch_layout(R.xml.numeric); break; case SWITCH_EMOJI: _recv.setPane_emoji(); break; case SWITCH_BACK_EMOJI: _recv.setPane_normal(); break; @@ -162,7 +162,7 @@ class KeyEventHandler implements Config.IKeyEventHandler public void setPane_normal(); public void showKeyboardConfig(); - public void switch_main(); + public void switch_text(); public void switch_second(); public void switch_layout(int layout_id); diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index 5851939..cdec907 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -319,9 +319,9 @@ public class Keyboard2 extends InputMethodService _keyboardView.set_shift_state(state, lock); } - public void switch_main() + public void switch_text() { - _keyboardView.setKeyboard(main_layout()); + _keyboardView.setKeyboard(_currentTextLayout); } public void switch_layout(int layout_id)