Revert changes in NotificationView

This commit is contained in:
Stefan Painhapp 2022-11-18 01:54:03 +09:00
parent 60235c3989
commit bf01ef80f6
1 changed files with 12 additions and 2 deletions

View File

@ -338,7 +338,12 @@ extension NotificationView {
quoteBackgroundView.layoutMargins = UIEdgeInsets(top: 16, left: 0, bottom: 0, right: 0)
quoteBackgroundView.translatesAutoresizingMaskIntoConstraints = false
quoteStatusViewContainerView.addSubview(quoteBackgroundView)
quoteBackgroundView.pinToParent()
NSLayoutConstraint.activate([
quoteBackgroundView.topAnchor.constraint(equalTo: quoteStatusViewContainerView.layoutMarginsGuide.topAnchor),
quoteBackgroundView.leadingAnchor.constraint(equalTo: quoteStatusViewContainerView.layoutMarginsGuide.leadingAnchor),
quoteBackgroundView.trailingAnchor.constraint(equalTo: quoteStatusViewContainerView.layoutMarginsGuide.trailingAnchor),
quoteBackgroundView.bottomAnchor.constraint(equalTo: quoteStatusViewContainerView.layoutMarginsGuide.bottomAnchor),
])
quoteBackgroundView.backgroundColor = .secondarySystemBackground
quoteBackgroundView.layer.masksToBounds = true
quoteBackgroundView.layer.cornerCurve = .continuous
@ -348,7 +353,12 @@ extension NotificationView {
quoteStatusView.translatesAutoresizingMaskIntoConstraints = false
quoteBackgroundView.addSubview(quoteStatusView)
quoteStatusView.pinToParent()
NSLayoutConstraint.activate([
quoteStatusView.topAnchor.constraint(equalTo: quoteBackgroundView.layoutMarginsGuide.topAnchor),
quoteStatusView.leadingAnchor.constraint(equalTo: quoteBackgroundView.layoutMarginsGuide.leadingAnchor),
quoteStatusView.trailingAnchor.constraint(equalTo: quoteBackgroundView.layoutMarginsGuide.trailingAnchor),
quoteStatusView.bottomAnchor.constraint(equalTo: quoteBackgroundView.layoutMarginsGuide.bottomAnchor),
])
quoteStatusView.setup(style: .notificationQuote)
statusView.isHidden = true