Skip to content

Conversation

dreampiggy
Copy link
Contributor

@dreampiggy dreampiggy commented Jul 30, 2023

Key idea:

  1. Image Loading pipeline is based on operation key, when start/cancel it always need operation key
  2. Stateful view has multiple operation key for different image property, we can use KeyPath as the hint to generate operation key
  3. To make exists API compatible, we do not change much, however, in 6.0 we may do refactory and store all the loadState/operation/result into the single object, instead of 3

This is the re-new of #2790
This close #2701

Related

This is the base need before #3569 been merged. Must merge this first then rebase that branch

…s state management

Key idea:
1. Image Loading pipeline is based on `operation key`, when start/cancel it always need operation key
2. Stateful view has multiple operation key for different image property, we can use KeyPath as the hint to generate operation key
3. To make exists API compatible, we do not change much, however, in 6.0 we may do refactory and store all the loadState/operation/result into the single object, instead of 3
@dreampiggy dreampiggy force-pushed the feature_set_image_state_api branch from dec9982 to 1c92951 Compare July 31, 2023 02:40
@dreampiggy
Copy link
Contributor Author

The SDWebImageLoadState class is introduced to provide more about state. Not only just URL or Progress, will effect v6.0's design.

@dreampiggy dreampiggy added this to the 5.18.0 milestone Jul 31, 2023
@dreampiggy dreampiggy merged commit 5ef6c83 into SDWebImage:master Jul 31, 2023
@dreampiggy dreampiggy deleted the feature_set_image_state_api branch July 31, 2023 10:00
@dreampiggy dreampiggy mentioned this pull request Nov 30, 2023
8 tasks
* @note You can use method `UIView+WebCacheOperation` to investigate different queries' operation.
* @note For the history version compatible, when current UIView has property exactly called `image`, the operation key will use `NSStringFromClass(self.class)`. Include `UIImageView.image/NSImageView.image/NSButton.image` (without `UIButton`)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Allows the UIButton to check and set different state for current progress and transition
1 participant