Skip to content

Commit

Permalink
Merge pull request #13007 from sobitneupane/sn_comment-emoji
Browse files Browse the repository at this point in the history
[No QA] Add comment for targetOffset calculation
  • Loading branch information
chiragsalian authored Nov 28, 2022
2 parents fedefd1 + 2c07b8b commit ecb3574
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/EmojiPicker/EmojiPickerMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ class EmojiPickerMenu extends Component {
if (offsetAtEmojiBottom - this.currentScrollOffset >= CONST.NON_NATIVE_EMOJI_PICKER_LIST_HEIGHT) {
targetOffset = offsetAtEmojiBottom - CONST.NON_NATIVE_EMOJI_PICKER_LIST_HEIGHT;
} else if (offsetAtEmojiTop - CONST.EMOJI_PICKER_HEADER_HEIGHT <= this.currentScrollOffset) {
// There is always a sticky header on the top, subtract the EMOJI_PICKER_HEADER_HEIGHT from offsetAtEmojiTop to get the correct scroll position.
targetOffset = offsetAtEmojiTop - CONST.EMOJI_PICKER_HEADER_HEIGHT;
}
if (targetOffset !== this.currentScrollOffset) {
Expand Down

0 comments on commit ecb3574

Please sign in to comment.