TwidereProject / Twidere-Android

http://twidere.com
2.75k stars 377 forks source link

Pixelated avatar on Friendica account #1103

Open Rudloff opened 6 years ago

Rudloff commented 6 years ago

Expected behavior

The avatar image should be displayed at a correct size.

Actual behavior

The avatar is really pixelated: screenshot_20180327-170910

This is because Friendica's users/show API returns 48x48 px image like the Twitter API. But I see you are using a function to get the full image for Twitter: https://github.com/TwidereProject/Twidere-Android/blob/845117992600c608c1442bb9b4473a9ba00ff169/twidere/src/main/kotlin/org/mariotaku/twidere/util/Utils.kt#L299 Could we do the same thing for Friendica? (I can submit a PR to Friendica if needed.)

Steps to reproduce

Display a Friendica/GNU Social account in Twidere.

Extra info

Android version: 6.0.1

Network type:

App version: 3.7.3

Build variant:

Micro-blogging service:

App settings:

mariotaku commented 6 years ago

GNU Social added profile_image_url_profile_size field in User object, and Fanfou added profile_image_url_large. Both fields has an URL pointed to larger profile image. You can consider use fields like that.

mariotaku commented 6 years ago

See https://github.com/TwidereProject/Twidere-Android/blob/a1e58482027d8c40b5c33cb551981f2beb497ec6/twidere.component.common/src/main/java/org/mariotaku/microblog/library/model/microblog/User.java#L156