Please can you test this app on Android devices. Avatar uploading doesn't work on android. I have installed the latest version from playstore but it is not uploading my avatar.
@skhizerabass It's a known bug.
Currently this is a limitation in the image caching lib we're using: see https://github.com/DylanVann/react-native-fast-image/issues/197#issuecomment-385333467
We're open to PRs or even to react-native-fast-image PR fixing this error.
I'll leave this issue open until it's fixed.
I believe it never uploads the avatar on server. Because i never get any response from server Nor it changes even after uninstalling and reinstalling the app.
Can you look into this issue ?
@skhizerabass Sure. I'll take a look as soon as react-native-fast-image is fixed too.
Ok thank you .
Hey team,
Any updates on this? Avatar doesn't refresh and I can't change it to anything.
@SteveUNSW Not yet.
We're working on performance right now (startup time, rest api requests, streams, etc).
This is a known bug that "don't break things" for itself.
Some time ago, we changed the way we fetch avatars by getting initials from the server too.
This is probably a server cache issue, but it's not a priority.
We can resolve this for the time being by setting priority to high on FastImage in Avatar.js
FastImage
style={[styles.avatar]}
source={{
uri,
priority: FastImage.priority.high
}}
/>
@saadqbal can you open a PR?
@diegolmello our code is way too changed. Won't be possible for you to merge.
The best way for me was to add a ts which is always different...
@AugustoAleGon Can you explain more or open a PR?
Sure. Let me open a PR with it.
I can confirm: when changing an avatar on the server (uploading an image), then it is not replaced on the RC-RN client.
I chose the easy way.Enter a random number after the URL. Then the photo has been changed.
I did a deep investigation into the issue and would like to share following result:
RC-RN client does not reflect any changes to the Avatar.
RC-RN client: 4.6.4.295 iOS, 4.6.4.2118 (Android)
RC server: 2.4.11
Things I tried and tested:
The "Avatar cache time" is correctly reflected in the http-response of the Avatar, but the RC-RN client does not respect it. Also using the apps "Clear local server cache" will not refresh the avatar.
So from my point of view, the component FastImage is used with FastImage.cacheControl.immutable - (Default) instead of FastImage.cacheControl.web (Use headers and follow normal caching procedure). Maybe there is also a bug with this in FastImage, see https://github.com/DylanVann/react-native-fast-image/pull/654/commits/87db4ccb573753cdab3b0ef0373f95a212583267
As I'm not fluent in React, I really wouldn't know where to set cacheControl.
Most helpful comment
I did a deep investigation into the issue and would like to share following result:
RC-RN client does not reflect any changes to the Avatar.
RC-RN client: 4.6.4.295 iOS, 4.6.4.2118 (Android)
RC server: 2.4.11
Things I tried and tested:
The "Avatar cache time" is correctly reflected in the http-response of the Avatar, but the RC-RN client does not respect it. Also using the apps "Clear local server cache" will not refresh the avatar.
So from my point of view, the component FastImage is used with
FastImage.cacheControl.immutable- (Default) instead ofFastImage.cacheControl.web(Use headers and follow normal caching procedure). Maybe there is also a bug with this in FastImage, see https://github.com/DylanVann/react-native-fast-image/pull/654/commits/87db4ccb573753cdab3b0ef0373f95a212583267As I'm not fluent in React, I really wouldn't know where to set
cacheControl.