From 15ce200ce3f9d19f1a1f1fb43f176bf511f14271 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Tue, 28 Dec 2021 17:47:18 +0100 Subject: Separate "handler" code As with the previous commit, remove casts of the context. The "handler" object is referenced in the "config" object for now. --- srcs/juloo.keyboard2/EmojiKeyButton.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'srcs/juloo.keyboard2/EmojiKeyButton.java') 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); } } -- cgit v1.2.3