nextcloud / news-android

📱🗞️ Android client for the Nextcloud news/feed reader app
https://play.google.com/store/apps/details?id=de.luhmer.owncloudnewsreader
GNU Affero General Public License v3.0
693 stars 257 forks source link

sidebar nav avatar is not updating #1247

Open Blaimi opened 1 year ago

Blaimi commented 1 year ago

I changed my avatar and now the news app still displays the old picture. The nextcloud app itself got the update.

David-Development commented 1 year ago

@Blaimi Is this still an issue? The images are cached for about a day if I'm not mistaken.

Blaimi commented 1 year ago

Hi :),

yes. It's still the wrong avatar. I can't remember when i canged it, but it should be around two weeks ago. I did not clear any caches or relogin or something.

Thank you :)

David-Development commented 1 year ago

@Blaimi Which version of the app are you using?

Blaimi commented 1 year ago

0.9.9.81. I can't remember if it is installed via Play Store or via F-Droid

Blaimi commented 1 year ago

But: If the image cache is implemented with a ttl: I had the old image for at least two years, maybe longer than I have this device 😉

David-Development commented 1 year ago

It shouldn't be.. 😅

could you check what the Avatar is when you open the following url: https://nextcloud.xxx.com/index.php/avatar/<your-name>/64 - e.g. https://nextcloud.xxx.com/index.php/avatar/david/64

You can find the user id in the web UI if you go to files -> Files Settings -> WebDav -> The last part of the URL is your user id.

Maybe you can also get the response headers to see what the TTL is for you? e.g. curl -v https://nextcloud.xxx.com/index.php/avatar/david/64 (please make sure to remove all sensitive information before dumping the output here)

David-Development commented 1 year ago

Okay, I found the issue. It looks like that the library we use for ImageLoading doesn't handle caching very well. It only uses a URL as the cache key. Cache Headers such as Last-Modified or ETag are completely ignored. I'll try to find a solution to fix this issue..

https://github.com/bumptech/glide/issues/1847