Tags: sparrowcode/DiffableKit
Tags
Simplify image dimming to pure tintColorDidChange swap The previous approach tried to detect original vs desaturated images by comparing references in updateImageDimming(), which broke on undim: the method read the desaturated image back from contentConfiguration and overwrote the stored original with it. Now tintColorDidChange simply saves the original on dim and restores it on undim — no separate method, no flags, no heuristics. Cell providers no longer need to call updateImageDimming() manually. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove saveOriginal parameter from updateImageDimming The parameter leaked internal caching logic into the public call sites. Now the method auto-detects a new original image via identity check (content.image !== originalImage), so callers no longer need to know about the caching mechanism. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract shared cell dimming logic into DiffableTableViewCell base class DiffableSubtitleTableViewCell and DiffableButtonTableViewCell now inherit from DiffableTableViewCell instead of UITableViewCell directly, removing duplicated image dimming, prepareForReuse and tintColorDidChange code. Changed reuseIdentifier from static to class var to support overrides. Extracted magic numbers into named constants. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PreviousNext