From 486b41d7fc01656874c39071daaf3c3c57a6806b Mon Sep 17 00:00:00 2001 From: CMK Date: Wed, 23 Jun 2021 23:41:53 +0800 Subject: [PATCH] fix: timeline image reuse cause mask corner missing issue --- .../Share/View/Container/MosaicImageViewContainer.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift b/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift index f6ea1edf0..ecd375087 100644 --- a/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift +++ b/Mastodon/Scene/Share/View/Container/MosaicImageViewContainer.swift @@ -103,11 +103,19 @@ extension MosaicImageViewContainer { imageViews.forEach { imageView in imageView.constraints.forEach { imageView.removeConstraint($0) } imageView.removeFromSuperview() + imageView.layer.maskedCorners = [ + .layerMinXMinYCorner, .layerMaxXMinYCorner, + .layerMinXMaxYCorner, .layerMaxXMaxYCorner + ] imageView.image = nil } blurhashOverlayImageViews.forEach { imageView in imageView.constraints.forEach { imageView.removeConstraint($0) } imageView.removeFromSuperview() + imageView.layer.maskedCorners = [ + .layerMinXMinYCorner, .layerMaxXMinYCorner, + .layerMinXMaxYCorner, .layerMaxXMaxYCorner + ] imageView.image = nil }