jiti-meet/react
Saúl Ibarra Corretgé 0a9333af02 rn: refactor Avatar to deal with FastImage changes
Updating react-native-fast-image brings a couple of interesting changes:

- onLoad is not called for cached images (reported and ignored upstream)
- load progress not working if component not displayed (on Android)

In order to fix this, a combination of 2 approaches was used:

- onLoadEnd / onError are used to detect if the image is loaded
- off-screen rendering is used on Android to get progress events

While implementing the above, yours truly noticed the complexity was increasing
way too much, so some extra refactoring was also performed:

- componentWillReceiveProps is dropped
- an auxiliary component (AvatarContent) is used for the actual content of the
  Avatar, with the former passing the key prop to the latter

Using the key prop ensures AvatarContent will be recreated if the URI changes,
which is not a bad idea anyway, since the new image needs to be downloaded.
2018-12-18 09:05:50 +01:00
..
features rn: refactor Avatar to deal with FastImage changes 2018-12-18 09:05:50 +01:00
.eslintrc-react-native.js feat(eslint): use new eslint-config-jitsi 2018-06-13 11:27:39 +02:00
.eslintrc.js feat(eslint): tame the beast 2018-10-10 18:07:36 +02:00
index.native.js Replace console with logger 2018-08-05 17:04:19 -05:00
index.web.js fix(web_ios): Not rendering when the browser back button is pressed. 2018-05-07 15:26:19 +02:00