From 35b390d3c11651350b2af799249b297c8e011583 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 11 May 2023 18:38:49 -0400 Subject: [PATCH] Fix MultiSourceEmojiLabel --- Tusker/Views/MultiSourceEmojiLabel.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Tusker/Views/MultiSourceEmojiLabel.swift b/Tusker/Views/MultiSourceEmojiLabel.swift index 35479f2a..1b682121 100644 --- a/Tusker/Views/MultiSourceEmojiLabel.swift +++ b/Tusker/Views/MultiSourceEmojiLabel.swift @@ -22,10 +22,6 @@ class MultiSourceEmojiLabel: UILabel, BaseEmojiLabel { func setEmojis(pairs: [(String, [Emoji])], identifier: ID) { guard pairs.count > 0 else { return } - self.emojiIdentifier = identifier - emojiRequests.forEach { $0.cancel() } - emojiRequests = [] - var attributedStrings = pairs.map { NSAttributedString(string: $0.0) } func recombine() { @@ -40,7 +36,7 @@ class MultiSourceEmojiLabel: UILabel, BaseEmojiLabel { self.replaceEmojis(in: string, emojis: emojis, identifier: identifier) { (attributedString, _) in attributedStrings[index] = attributedString DispatchQueue.main.async { [weak self] in - guard let self = self, self.emojiIdentifier == AnyHashable(identifier) else { return } + guard let self else { return } recombine() } }