diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-08-29 14:23:48 +0200 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2023-08-29 14:48:01 +0200 |
commit | 1e5ac99fd840b7d85d06fd08b27f2c2cb6201b9c (patch) | |
tree | 51113d64edaa3a9bf9c079a4c994892705cbd2c3 | |
parent | 031032fb892560a0f5fa1a996aea77f593f54704 (diff) |
SL-20209 Open read access to the recently used emojis
-rw-r--r-- | indra/newview/llfloateremojipicker.cpp | 10 | ||||
-rw-r--r-- | 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<llwchar>& 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<llwchar>& 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 }; |