From 1e5ac99fd840b7d85d06fd08b27f2c2cb6201b9c Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 29 Aug 2023 14:23:48 +0200 Subject: SL-20209 Open read access to the recently used emojis --- indra/newview/llfloateremojipicker.cpp | 10 ++++++++++ indra/newview/llfloateremojipicker.h | 9 +++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp index af807ba7cf..95ea9fc478 100644 --- a/indra/newview/llfloateremojipicker.cpp +++ b/indra/newview/llfloateremojipicker.cpp @@ -723,6 +723,14 @@ void LLFloaterEmojiPicker::closeFloater(bool app_quitting) } } +// static +std::list& LLFloaterEmojiPicker::getRecentlyUsed() +{ + loadState(); + return sRecentlyUsed; +} + +// static void LLFloaterEmojiPicker::onEmojiUsed(llwchar emoji) { // Update sRecentlyUsed @@ -762,6 +770,7 @@ void LLFloaterEmojiPicker::onEmojiUsed(llwchar emoji) sFrequentlyUsed.push_back(std::make_pair(emoji, 1)); } +// static void LLFloaterEmojiPicker::loadState() { if (!sStateFileName.empty()) @@ -844,6 +853,7 @@ void LLFloaterEmojiPicker::loadState() } } +// static void LLFloaterEmojiPicker::saveState() { if (sStateFileName.empty()) diff --git a/indra/newview/llfloateremojipicker.h b/indra/newview/llfloateremojipicker.h index 3cae818e15..decee41721 100644 --- a/indra/newview/llfloateremojipicker.h +++ b/indra/newview/llfloateremojipicker.h @@ -54,6 +54,11 @@ public: virtual void closeFloater(bool app_quitting = false) override; + static std::list& getRecentlyUsed(); + static void onEmojiUsed(llwchar emoji); + static void loadState(); + static void saveState(); + private: void fillGroups(); void moveGroups(); @@ -75,10 +80,6 @@ private: virtual BOOL handleKeyHere(KEY key, MASK mask) override; - void onEmojiUsed(llwchar emoji); - void loadState(); - void saveState(); - class LLPanel* mGroups { nullptr }; class LLPanel* mBadge { nullptr }; class LLFilterEditor* mFilter { nullptr }; -- cgit v1.2.3