diff --git a/Mastodon/Scene/Share/View/Content/StatusView.swift b/Mastodon/Scene/Share/View/Content/StatusView.swift index fc502597..1bedb945 100644 --- a/Mastodon/Scene/Share/View/Content/StatusView.swift +++ b/Mastodon/Scene/Share/View/Content/StatusView.swift @@ -103,7 +103,7 @@ final class StatusView: UIView { // do not use visual effect view due to we blur text only without background let contentWarningBlurContentImageView: UIImageView = { let imageView = UIImageView() - imageView.backgroundColor = .secondarySystemGroupedBackground + imageView.backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color imageView.layer.masksToBounds = false return imageView }() @@ -126,6 +126,15 @@ final class StatusView: UIView { super.init(coder: coder) _init() } + + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + // update blur image when interface style changed + if previousTraitCollection?.userInterfaceStyle != traitCollection.userInterfaceStyle { + drawContentWarningImageView() + } + } } diff --git a/Mastodon/Scene/Share/View/TableviewCell/StatusTableViewCell.swift b/Mastodon/Scene/Share/View/TableviewCell/StatusTableViewCell.swift index 3c968f79..ed1d083c 100644 --- a/Mastodon/Scene/Share/View/TableviewCell/StatusTableViewCell.swift +++ b/Mastodon/Scene/Share/View/TableviewCell/StatusTableViewCell.swift @@ -50,6 +50,7 @@ extension StatusTableViewCell { private func _init() { selectionStyle = .none backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color + statusView.contentWarningBlurContentImageView.backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color statusView.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(statusView)