Don't incorrectly store a template image as an original

This commit is contained in:
Maurice Parker 2020-11-20 17:53:31 -06:00
parent a18491b037
commit 5f2bf5fc5c
1 changed files with 3 additions and 0 deletions

View File

@ -28,7 +28,10 @@ private extension AccountCell {
guard isImageTemplateCapable else { return } guard isImageTemplateCapable else { return }
if backgroundStyle != .normal { if backgroundStyle != .normal {
guard !(imageView?.image?.isTemplate ?? false) else { return }
originalImage = imageView?.image originalImage = imageView?.image
let templateImage = imageView?.image?.copy() as? NSImage let templateImage = imageView?.image?.copy() as? NSImage
templateImage?.isTemplate = true templateImage?.isTemplate = true
imageView?.image = templateImage imageView?.image = templateImage