Fix some concurrency warnings.

This commit is contained in:
Brent Simmons 2024-05-03 22:49:27 -07:00
parent 87fe78f598
commit 7d04021415
4 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ import UIKit
// Uses a cache. // Uses a cache.
// Main thready only. // Main thready only.
final class SingleLineUILabelSizer { @MainActor final class SingleLineUILabelSizer {
let font: UIFont let font: UIFont
private var cache = [String: CGSize]() private var cache = [String: CGSize]()
@ -36,7 +36,7 @@ final class SingleLineUILabelSizer {
} }
static private var sizers = [UIFont: SingleLineUILabelSizer]() @MainActor static private var sizers = [UIFont: SingleLineUILabelSizer]()
static func sizer(for font: UIFont) -> SingleLineUILabelSizer { static func sizer(for font: UIFont) -> SingleLineUILabelSizer {

View File

@ -74,7 +74,7 @@ struct TimelineAccessibilityCellLayout: TimelineCellLayout {
private extension TimelineAccessibilityCellLayout { private extension TimelineAccessibilityCellLayout {
static func rectForDate(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { @MainActor static func rectForDate(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect {
var r = CGRect.zero var r = CGRect.zero

View File

@ -94,7 +94,7 @@ extension TimelineCellLayout {
} }
static func rectForFeedName(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { @MainActor static func rectForFeedName(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect {
var r = CGRect.zero var r = CGRect.zero
r.origin = point r.origin = point

View File

@ -109,7 +109,7 @@ struct TimelineDefaultCellLayout: TimelineCellLayout {
extension TimelineDefaultCellLayout { extension TimelineDefaultCellLayout {
static func rectForDate(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect { @MainActor static func rectForDate(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> CGRect {
var r = CGRect.zero var r = CGRect.zero