Fix more strict concurrency warnings

This commit is contained in:
Shadowfacts 2024-03-09 14:18:28 -05:00
parent d481ef6c9f
commit 175001d561
3 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import Pachyderm
class AccountFollowsListViewController: UIViewController, CollectionViewController { class AccountFollowsListViewController: UIViewController, CollectionViewController {
private static let pageSize = 40 private static nonisolated let pageSize = 40
let accountID: String let accountID: String
let mastodonController: MastodonController let mastodonController: MastodonController

View File

@ -33,6 +33,7 @@ struct AccountDisplayNameView: View {
.onAppear(perform: self.loadEmojis) .onAppear(perform: self.loadEmojis)
} }
@MainActor
private func loadEmojis() { private func loadEmojis() {
let fullRange = NSRange(account.displayName.startIndex..., in: account.displayName) let fullRange = NSRange(account.displayName.startIndex..., in: account.displayName)
let matches = emojiRegex.matches(in: account.displayName, options: [], range: fullRange) let matches = emojiRegex.matches(in: account.displayName, options: [], range: fullRange)

View File

@ -33,6 +33,7 @@ struct CustomEmojiImageView: View {
} }
} }
@MainActor
private func loadImage() { private func loadImage() {
request = ImageCache.emojis.get(URL(emoji.url)!) { (_, image) in request = ImageCache.emojis.get(URL(emoji.url)!) { (_, image) in
DispatchQueue.main.async { DispatchQueue.main.async {