diff options
| author | Jules Aguillon | 2021-12-28 17:47:18 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2021-12-28 17:47:18 +0100 |
| commit | 15ce200ce3f9d19f1a1f1fb43f176bf511f14271 (patch) | |
| tree | 9a001552834b4f70f04bea80d1f3bdaaed935eef /srcs/juloo.keyboard2/EmojiKeyButton.java | |
| parent | 0190cfc29a07a5a281f0fd1bdac4999ba65c19ba (diff) | |
| download | unexpected-keyboard-15ce200ce3f9d19f1a1f1fb43f176bf511f14271.tar.gz unexpected-keyboard-15ce200ce3f9d19f1a1f1fb43f176bf511f14271.zip | |
Separate "handler" code
As with the previous commit, remove casts of the context.
The "handler" object is referenced in the "config" object for now.
Diffstat (limited to 'srcs/juloo.keyboard2/EmojiKeyButton.java')
| -rw-r--r-- | srcs/juloo.keyboard2/EmojiKeyButton.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/srcs/juloo.keyboard2/EmojiKeyButton.java b/srcs/juloo.keyboard2/EmojiKeyButton.java index 3f86b1b..6f662b4 100644 --- a/srcs/juloo.keyboard2/EmojiKeyButton.java +++ b/srcs/juloo.keyboard2/EmojiKeyButton.java @@ -22,8 +22,7 @@ public class EmojiKeyButton extends Button public void onClick(View v) { - Keyboard2 main = (Keyboard2)getContext(); - - main.handleKeyUp(_key, 0); + Config config = Config.globalConfig(); + config.handler.handleKeyUp(_key, 0); } } |
