about summary refs log tree commit diff
path: root/bskyembed/src/components/embed.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-11-21 22:52:16 +0000
committerGitHub <noreply@github.com>2024-11-21 22:52:16 +0000
commitdc3a42edb1bcdb8c7f07111e936dddcfac1c1bb1 (patch)
tree7508231ca720f6bc3a833cb6504443685c4115b2 /bskyembed/src/components/embed.tsx
parent84724bb940a827a7020da6ccbd6fa80f7209a455 (diff)
downloadvoidsky-dc3a42edb1bcdb8c7f07111e936dddcfac1c1bb1.tar.zst
Reduce <Text> nesting (#6615)
* Move isOnlyEmoji out of RichText

To fix Fast Refresh.

* Make renderChildrenWithEmoji work with any children

* Always go through UITextView for consistency

It already contains the `selectable` and `iOS` checks inside.

* Move `emoji` check into `renderChildrenWithEmoji`

* Remove unnecessary intermediate UITextView nodes

* Make childHasEmoji check recursive

It didn't handle nested arrays etc correctly before.

* Remove the "children must be string" limitation

Should not be necessary now that we correctly handle nested arrays etc.

* Fix unnecessary regex reallocation

This doesn't have a global flag so it's okay to reuse.

* Remove unnecessary <Text> wrapper in RichText
Diffstat (limited to 'bskyembed/src/components/embed.tsx')
0 files changed, 0 insertions, 0 deletions