forked from RocketChat/Rocket.Chat.ReactNative
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHORE] Use JoyPixels (RocketChat#1164)
* react-emojione -> emoji-toolkit * Change to toUnicode() * Fix ascii emoji on joypixels * Revert unnecessary modify * Fix some emojis * Fix custom emojis (Android) * Update Snapshot
- Loading branch information
1 parent
9ba3710
commit 32a6810
Showing
14 changed files
with
3,345 additions
and
3,639 deletions.
There are no files selected for viewing
6,888 changes: 3,278 additions & 3,610 deletions
6,888
__tests__/__snapshots__/Storyshots.test.js.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/node_modules/emoji-toolkit/lib/js/joypixels.js b/node_modules/emoji-toolkit/lib/js/joypixels.js | ||
index 8e696e6..f2998b9 100644 | ||
--- a/node_modules/emoji-toolkit/lib/js/joypixels.js | ||
+++ b/node_modules/emoji-toolkit/lib/js/joypixels.js | ||
@@ -111,6 +111,7 @@ | ||
':L':'1f615', | ||
'=L':'1f615', | ||
':P':'1f61b', | ||
+ ':p':'1f61b', | ||
'=P':'1f61b', | ||
':b':'1f61b', | ||
':O':'1f62e', | ||
@@ -245,12 +246,19 @@ | ||
// replace regular shortnames first | ||
var unicode,fname; | ||
str = str.replace(ns.regShortNames, function(shortname) { | ||
- if( (typeof shortname === 'undefined') || (shortname === '') || (!(shortname in ns.emojiList)) ) { | ||
- // if the shortname doesnt exist just return the entire matchhju | ||
+ if( (typeof shortname === 'undefined') || (shortname === '') || (ns.shortnames.indexOf(shortname) === -1) ) { | ||
+ // if the shortname doesnt exist just return the entire match | ||
return shortname; | ||
} | ||
+ if (!ns.emojiList[shortname]) { | ||
+ for ( var emoji in ns.emojiList ) { | ||
+ if (!ns.emojiList.hasOwnProperty(emoji) || (emoji === '')) continue; | ||
+ if (ns.emojiList[emoji].shortnames.indexOf(shortname) === -1) continue; | ||
+ shortname = emoji; | ||
+ break; | ||
+ } | ||
+ } | ||
unicode = ns.emojiList[shortname].uc_full.toUpperCase(); | ||
- fname = ns.emojiList[shortname].uc_base; | ||
return ns.convert(unicode); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters