nextcloud / nextcloud/talk-android
Extract image loading
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 739
- Forks
- 321
- Avg merge
- 14h 59m
- Merged PRs (30d)
- 151
Description
In PR #2449 the image loading Fresco is replaced by Coil.
At this point some image loading for ImageViews is collected into the ImageViewExtension. But also Coil is used in multiple locations for special cases. The extension and also the wide spreading Coil usage has a bad taste.
The usage of an extension pollutes the ImageView signature with a lot of new functions, and is also difficult to call from Java. Additionally it limits what can be done in terms of Dependency Injection for helping build your image request code.
And the extension funs in the ImageViewExtension have different scopes, which hints that they should be in separate places. There are generic view scope (loadImage) mixed with very domain-specific functions (loadGuestAvatar).
The image loading topic :
- must be centralized to make it reusable also for Files
- must be seperated into Talk domain specific and general image loading (e.g
ImageLoaderandTalkImageLoader) - muse be injectable to take advatage e.g of
CurrentUserProviderto avoid passing the user to every request to for base URL and credentials purposes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PR #2449 and the existing ImageViewExtension usage to understand how Coil image loading is currently spread across the project. Identify the general loading paths and Talk-specific cases, including loading for Files and use of CurrentUserProvider. Done means a centralized, injectable design separates general image loading from Talk-specific loading without relying on the extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100