Fix custom emojis not being shown in display names when scrolling

quickly

If the emojiIdentifier didn't change, the emojis wouldn't be re-added
even after the text had been reset.
This commit is contained in:
Shadowfacts 2020-03-01 23:27:11 -05:00
parent de02c73957
commit fa4b5d3542
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class EmojiLabel: UILabel {
private var emojiRequests: [ImageCache.Request] = [] private var emojiRequests: [ImageCache.Request] = []
func setEmojis(_ emojis: [Emoji], identifier: String) { func setEmojis(_ emojis: [Emoji], identifier: String) {
guard emojis.count > 0, self.emojiIdentifier != identifier, let attributedText = attributedText else { return } guard emojis.count > 0, let attributedText = attributedText else { return }
self.emojiIdentifier = identifier self.emojiIdentifier = identifier
emojiRequests.forEach { $0.cancel() } emojiRequests.forEach { $0.cancel() }