Skip to content

Commit

Permalink
Merge pull request #36486 from gedu/gedu/emoji_picker_lag
Browse files Browse the repository at this point in the history
Setting the amount of Emojis to draw in FlashList
  • Loading branch information
Beamanator authored Feb 23, 2024
2 parents 4a885f5 + 25d8898 commit 539e269
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,9 @@ const CONST = {

EMOJI_DEFAULT_SKIN_TONE: -1,

// Amount of emojis to render ahead at the end of the update cycle
EMOJI_DRAW_AMOUNT: 250,

INVISIBLE_CODEPOINTS: ['fe0f', '200d', '2066'],

UNICODE: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ function BaseEmojiPickerMenu({headerEmojis, scrollToHeader, isFiltered, listWrap
ref={forwardedRef}
keyboardShouldPersistTaps="handled"
data={data}
drawDistance={CONST.EMOJI_DRAW_AMOUNT}
renderItem={renderItem}
keyExtractor={keyExtractor}
numColumns={CONST.EMOJI_NUM_PER_ROW}
Expand Down

0 comments on commit 539e269

Please sign in to comment.