Repository navigation
merge duplicate emojis on frequently used - #45671
Conversation
| emojiMap.set(emoji.code, { | ||
| ...emoji, | ||
| count: existingEmoji.count + emoji.count, | ||
| lastUpdatedAt: Math.max(existingEmoji.lastUpdatedAt, emoji.lastUpdatedAt), | ||
| }); |
There was a problem hiding this comment.
| emojiMap.set(emoji.code, { | |
| ...emoji, | |
| count: existingEmoji.count + emoji.count, | |
| lastUpdatedAt: Math.max(existingEmoji.lastUpdatedAt, emoji.lastUpdatedAt), | |
| }); | |
| existingEmoji.count += emoji.count; | |
| existingEmoji.lastUpdatedAt = Math.max(existingEmoji.lastUpdatedAt, emoji.lastUpdatedAt); |
NAB
There was a problem hiding this comment.
Pushed a new commit with this suggesstion
Reviewer Checklist
Screenshots/VideosAndroid: NativeemojiAndroid.mp4Android: mWeb ChromeemojiAndroidmWeb.mp4iOS: NativeemojiiOS.mp4iOS: mWeb SafariemojiiOSmWeb.mp4MacOS: Chrome / SafariemojiChrome.mp4MacOS: DesktopemojiDesktop.mp4 |
jasperhuangg
left a comment
There was a problem hiding this comment.
small change, thanks for getting this up!
| // On AddComment API response, each variant of the same emoji (with different skin tones) is | ||
| // treated as a separate entry due to unique emoji codes for each variant. | ||
| // So merge duplicate emojis, sum their counts, and use the latest lastUpdatedAt timestamp, then sort accordingly. | ||
| const emojiMap = new Map<string, FrequentlyUsedEmoji>(); |
There was a problem hiding this comment.
It's obvious that this a Map, let's call this frequentlyUsedEmojiCodesToObjects
There was a problem hiding this comment.
Pushed a new commit with this changes
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/jasperhuangg in version: 9.0.11-0 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 9.0.11-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.11-5 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.12-0 🚀
|
Details
Merge Duplicate Emojis on frequently used and ensure to summing their count and use the latest lastUpdatedAt timestamp
Fixed Issues
$ #45262
PROPOSAL: #45262 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
New-Expensify.22.mp4
MacOS: Desktop