nextcloud / nextcloud/talk-android

Extract image loading

Open
#2,559 0 comments 0 reactions 0 assignees View on GitHub

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 ImageLoader and TalkImageLoader)
  • muse be injectable to take advatage e.g of CurrentUserProvider to avoid passing the user to every request to for base URL and credentials purposes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.