abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/EmojiKeyButton.java
diff options
context:
space:
mode:
authorJules Aguillon2021-12-28 17:47:18 +0100
committerJules Aguillon2021-12-28 17:47:18 +0100
commit15ce200ce3f9d19f1a1f1fb43f176bf511f14271 (patch)
tree9a001552834b4f70f04bea80d1f3bdaaed935eef /srcs/juloo.keyboard2/EmojiKeyButton.java
parent0190cfc29a07a5a281f0fd1bdac4999ba65c19ba (diff)
downloadunexpected-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.java5
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);
}
}