Skip to content

Commit

Permalink
updated methods
Browse files Browse the repository at this point in the history
Signed-off-by: Ayaz Alavi <ayaz.alavi@gmail.com>
  • Loading branch information
ayazalavi committed Oct 18, 2023
1 parent 2ad6677 commit 2f8dd62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/libs/EmojiUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function trimEmojiUnicode(emojiCode) {
* @param {String} message
* @returns {Boolean}
*/
function firstLetterIsEmoji(message) {
function isFirstLetterEmoji(message) {
const trimmedMessage = Str.replaceAll(message.replace(/ /g, ''), '\n', '');
const match = trimmedMessage.match(CONST.REGEX.EMOJIS);

Expand Down Expand Up @@ -514,5 +514,5 @@ export {
replaceAndExtractEmojis,
extractEmojis,
getAddedEmojis,
firstLetterIsEmoji,
isFirstLetterEmoji,
};
4 changes: 2 additions & 2 deletions src/pages/home/report/ReportActionItemFragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ function ReportActionItemFragment(props) {
* @returns {ReactNode | null} Text component with zero width character
*/

function checkForEmojiForSelection(text, displayAsGroup) {
const firstLetterIsEmoji = EmojiUtils.firstLetterIsEmoji(text);
const checkForEmojiForSelection = (text, displayAsGroup) => {
const firstLetterIsEmoji = EmojiUtils.isFirstLetterEmoji(text);
if (firstLetterIsEmoji && !displayAsGroup && !Browser.isMobile()) {
return <Text>&#x200b;</Text>;
}
Expand Down

0 comments on commit 2f8dd62

Please sign in to comment.