Addressing feedback from https://phab.comm.dev/D7225 - extracted the common part from <RemoteImage> to a new component: <LoadableImage>
Details
Details
- Reviewers
ashoat atul ginsu - Commits
- rCOMM543f5b955c02: [native] Extract LoadableImage component
Media images are still loaded and displayed correctly.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Comment Actions
Just a question. Will leave it on others' queue in case they have review comments
native/media/remote-image.react.js | ||
---|---|---|
33–41 | Given that both RemoteImage and RemoteImage seem to need this functionality, I'm wondering why you didn't factor it out into LoadableImage |
native/media/loadable-image.react.js | ||
---|---|---|
36 | Can we use React.useMemo here now that we're in a functional component? |
native/media/remote-image.react.js | ||
---|---|---|
33–41 | Ah, I see... LoadableImage can't handle attempt because the component that renders it, EncryptedImage, also needs awareness of attempt so that decryptMedia gets called again. That makes sense |