temp poll

This commit is contained in:
Shadowfacts 2023-05-07 14:16:40 -04:00
parent 455d532cd0
commit 24b467360c
1 changed files with 4 additions and 1 deletions

View File

@ -91,6 +91,9 @@ class PollFinishedNotificationCollectionViewCell: UICollectionViewCell {
contentView.addSubview(iconView)
vStack.translatesAutoresizingMaskIntoConstraints = false
contentView.addSubview(vStack)
let vStackBottomConstraint = vStack.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -8)
// need something to break during intermediate layouts when the cell imposes a 44pt height :S
vStackBottomConstraint.priority = .init(999)
NSLayoutConstraint.activate([
iconView.topAnchor.constraint(equalTo: vStack.topAnchor),
iconView.trailingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16 + 50),
@ -98,7 +101,7 @@ class PollFinishedNotificationCollectionViewCell: UICollectionViewCell {
vStack.leadingAnchor.constraint(equalTo: iconView.trailingAnchor, constant: 8),
vStack.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16),
vStack.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 8),
vStack.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -8),
vStackBottomConstraint,
])
NotificationCenter.default.addObserver(self, selector: #selector(updateUIForPreferences), name: .preferencesChanged, object: nil)