diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-05-17 14:28:36 +0200 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2023-05-17 19:06:57 +0200 |
commit | 671978e3927bc3ba9fc34008bbb7efd6f07b6c81 (patch) | |
tree | 63a5bb74ab3a6a78ec6ff4e67b5060c7d304ffde /indra/llui/llemojidictionary.cpp | |
parent | bb96ac2621dd09dbc318d04f7e04ffbc50ec3174 (diff) |
SL-19575 Create emoji gallery (fix bug with drawing emojis in chat history)
Diffstat (limited to 'indra/llui/llemojidictionary.cpp')
-rw-r--r-- | indra/llui/llemojidictionary.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llui/llemojidictionary.cpp b/indra/llui/llemojidictionary.cpp index bb5c94689a..179c5d25bf 100644 --- a/indra/llui/llemojidictionary.cpp +++ b/indra/llui/llemojidictionary.cpp @@ -199,6 +199,17 @@ std::string LLEmojiDictionary::getNameFromEmoji(llwchar ch) const return (mEmoji2Descr.end() != it) ? it->second->Name : LLStringUtil::null; } +bool LLEmojiDictionary::isEmoji(llwchar ch) const +{ + // Currently used codes: A9,AE,203C,2049,2122,...,2B55,3030,303D,3297,3299,1F004,...,1FAF6 + if (ch == 0xA9 || ch == 0xAE || (ch >= 0x2000 && ch < 0x3300) || (ch >= 0x1F000 && ch < 0x20000)) + { + return mEmoji2Descr.find(ch) != mEmoji2Descr.end(); + } + + return false; +} + void LLEmojiDictionary::addEmoji(LLEmojiDescriptor&& descr) { mEmojis.push_back(descr); |