Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runfix: Avoid mutliple emojis with the same key #15951

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Conversation

atomrc
Copy link
Contributor

@atomrc atomrc commented Oct 9, 2023

Description

Avoid having those emojis displayed with the same react key (sunglasses appear twice for example)

Checklist

  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

Comment on lines +89 to +91
const emojiUsageCount: Record<string, number> = loadValue(StorageKey.CONVERSATION.EMOJI_USAGE_COUNT) || {};

const getUsageCount = (emojiName: string): number => emojiUsageCount[emojiName] || 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a simple optimisation. This doesn't need to live in the react world

Copy link
Contributor

@tlebon tlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎 😎

Copy link
Contributor

@PatrykBuniX PatrykBuniX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 😎

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #15951 (5103f1c) into dev (cbe34d9) will decrease coverage by 0.39%.
Report is 4 commits behind head on dev.
The diff coverage is 30.69%.

@@            Coverage Diff             @@
##              dev   #15951      +/-   ##
==========================================
- Coverage   44.67%   44.28%   -0.39%     
==========================================
  Files         668      683      +15     
  Lines       22671    22919     +248     
  Branches     5169     5213      +44     
==========================================
+ Hits        10128    10150      +22     
- Misses      11245    11468     +223     
- Partials     1298     1301       +3     

@atomrc atomrc merged commit 0c530c4 into dev Oct 9, 2023
11 checks passed
@atomrc atomrc deleted the runfix/emoji-picker branch October 9, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants