From 42fcd6df510ecfbe62c10344cf3cbfd3374355d9 Mon Sep 17 00:00:00 2001 From: FineFindus <63370021+FineFindus@users.noreply.github.com> Date: Mon, 2 Jan 2023 16:58:31 +0100 Subject: [PATCH] refactor(emoji/recent): rename NEW_RECENT to NEW_RECENT_VALUE --- .../joinmastodon/android/ui/CustomEmojiPopupKeyboard.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/CustomEmojiPopupKeyboard.java b/mastodon/src/main/java/org/joinmastodon/android/ui/CustomEmojiPopupKeyboard.java index dfee4ecdc..693683399 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/CustomEmojiPopupKeyboard.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/CustomEmojiPopupKeyboard.java @@ -48,7 +48,8 @@ import me.grishka.appkit.utils.V; import me.grishka.appkit.views.UsableRecyclerView; public class CustomEmojiPopupKeyboard extends PopupKeyboard{ - private static final int NEW_RECENT=15; + //determines how many emoji need to be clicked, before it disappears from the recent emojis + private static final int NEW_RECENT_VALUE=15; private List emojis; private UsableRecyclerView list; @@ -138,10 +139,9 @@ public class CustomEmojiPopupKeyboard extends PopupKeyboard{ if (usageCount != null) { recentEmojis.put(emoji.shortcode, usageCount + 1); } else { - recentEmojis.put(emoji.shortcode, NEW_RECENT); + recentEmojis.put(emoji.shortcode, NEW_RECENT_VALUE); } - Log.e("Emojis", "increaseEmojiCount: " + recentEmojis); recentEmojis.entrySet().removeIf(e -> e.getValue() <= 0); recentEmojis.replaceAll((k, v) -> v - 1); GlobalUserPreferences.save();