From 175001d561ab7748ad2f9f8b59facb9407a08c16 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sat, 9 Mar 2024 14:18:28 -0500 Subject: [PATCH] Fix more strict concurrency warnings --- .../Account Follows/AccountFollowsListViewController.swift | 2 +- Tusker/Views/AccountDisplayNameView.swift | 1 + Tusker/Views/CustomEmojiImageView.swift | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift b/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift index f211bbfd..04fc9300 100644 --- a/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift +++ b/Tusker/Screens/Account Follows/AccountFollowsListViewController.swift @@ -11,7 +11,7 @@ import Pachyderm class AccountFollowsListViewController: UIViewController, CollectionViewController { - private static let pageSize = 40 + private static nonisolated let pageSize = 40 let accountID: String let mastodonController: MastodonController diff --git a/Tusker/Views/AccountDisplayNameView.swift b/Tusker/Views/AccountDisplayNameView.swift index 22e3effd..b089900b 100644 --- a/Tusker/Views/AccountDisplayNameView.swift +++ b/Tusker/Views/AccountDisplayNameView.swift @@ -33,6 +33,7 @@ struct AccountDisplayNameView: View { .onAppear(perform: self.loadEmojis) } + @MainActor private func loadEmojis() { let fullRange = NSRange(account.displayName.startIndex..., in: account.displayName) let matches = emojiRegex.matches(in: account.displayName, options: [], range: fullRange) diff --git a/Tusker/Views/CustomEmojiImageView.swift b/Tusker/Views/CustomEmojiImageView.swift index f046b9b8..9155696d 100644 --- a/Tusker/Views/CustomEmojiImageView.swift +++ b/Tusker/Views/CustomEmojiImageView.swift @@ -33,6 +33,7 @@ struct CustomEmojiImageView: View { } } + @MainActor private func loadImage() { request = ImageCache.emojis.get(URL(emoji.url)!) { (_, image) in DispatchQueue.main.async {