Maybe fix crash due to reading ScaledMetric on background thread

ScaledMetric.wrappedValue calls into Font.scaleFactor(textStyle:in:)
which uses a dictionary setter
This commit is contained in:
Shadowfacts 2023-10-28 13:56:25 -05:00
parent a07b398cbe
commit 3aa45cb365
1 changed files with 1 additions and 0 deletions

View File

@ -38,6 +38,7 @@ struct AccountDisplayNameView: View {
let matches = emojiRegex.matches(in: account.displayName, options: [], range: fullRange)
guard !matches.isEmpty else { return }
let emojiSize = self.emojiSize
let emojiImages = MultiThreadDictionary<String, Image>()
let group = DispatchGroup()