Fix cell reuse bug with follow/action notifications
This commit is contained in:
parent
a2fe0dfb78
commit
1b42cd7816
|
@ -155,8 +155,8 @@ class ActionNotificationGroupCollectionViewCell: UICollectionViewListCell {
|
||||||
}
|
}
|
||||||
imageView.update(for: avatarURL)
|
imageView.update(for: avatarURL)
|
||||||
}
|
}
|
||||||
for imageView in avatarStack.arrangedSubviews.dropFirst(visibleAvatars.count) {
|
while avatarStack.arrangedSubviews.count > visibleAvatars.count {
|
||||||
avatarStack.removeArrangedSubview(imageView)
|
avatarStack.arrangedSubviews.last!.removeFromSuperview()
|
||||||
}
|
}
|
||||||
|
|
||||||
actionLabel.setEmojis(pairs: people.map { ($0.displayOrUserName, $0.emojis) }, identifier: group.id)
|
actionLabel.setEmojis(pairs: people.map { ($0.displayOrUserName, $0.emojis) }, identifier: group.id)
|
||||||
|
|
|
@ -132,8 +132,8 @@ class FollowNotificationGroupCollectionViewCell: UICollectionViewListCell {
|
||||||
}
|
}
|
||||||
imageView.update(for: avatarURL)
|
imageView.update(for: avatarURL)
|
||||||
}
|
}
|
||||||
for imageView in avatarStack.arrangedSubviews.dropFirst(visibleAvatars.count) {
|
while avatarStack.arrangedSubviews.count > visibleAvatars.count {
|
||||||
avatarStack.removeArrangedSubview(imageView)
|
avatarStack.arrangedSubviews.last!.removeFromSuperview()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue