From e10c587dc5286db64a6f55010637f0c3f9f62d59 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sun, 5 Jun 2022 17:26:34 +0200 Subject: Refactor: Abstract KeyValue fields The meaning of the public fields of KeyValue was quite complicated and not handled consistently accross the app. Make these fields private and add a more abstract API on top. The meaning of these fields changed recently and it wasn't an easy change. I plan on making more changes in the future. --- srcs/juloo.keyboard2/EmojiKeyButton.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'srcs/juloo.keyboard2/EmojiKeyButton.java') diff --git a/srcs/juloo.keyboard2/EmojiKeyButton.java b/srcs/juloo.keyboard2/EmojiKeyButton.java index 1f5a3a0..d551ac5 100644 --- a/srcs/juloo.keyboard2/EmojiKeyButton.java +++ b/srcs/juloo.keyboard2/EmojiKeyButton.java @@ -15,8 +15,8 @@ public class EmojiKeyButton extends Button super(context, attrs); setOnClickListener(this); _key = KeyValue.getKeyByName(attrs.getAttributeValue(null, "key")); - setText(_key.symbol); - if ((_key.flags & KeyValue.FLAG_KEY_FONT) != 0) + setText(_key.getString()); + if (_key.hasFlags(KeyValue.FLAG_KEY_FONT)) setTypeface(Theme.getSpecialKeyFont(context)); } -- cgit v1.2.3