MihaelIsaev / MihaelIsaev/UIKitPlus

`ImageLoader` should remove image for bad `url`

Open
#30 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
628
Forks
36
PR merge metrics
No merged PRs in 30d

Description

When using a bad image url for a UImage :

UImage(url: $viewModel.map({ $0?.image }), loader: .defaultFade)

The existing image is kept, this is a problem when reusing a UImage.

Since ImageLoader does check the url is 'valid', perhaps it should reset the image before returning?
https://github.com/MihaelIsaev/UIKitPlus/blob/master/Classes/Objects/ImageLoader.swift#L44

Contributor guide

No contributing guide indexed for this repository

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 in Classes/Objects/ImageLoader.swift at the linked line around the invalid-URL check. Trace how the loader handles a bad URL when a UImage is reused, then verify that the previous image is no longer kept after the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.