mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-22 15:50:17 +01:00
Fix some concurrency warnings.
This commit is contained in:
parent
87fe78f598
commit
7d04021415
@ -12,7 +12,7 @@ import UIKit
|
||||
// Uses a cache.
|
||||
// Main thready only.
|
||||
|
||||
final class SingleLineUILabelSizer {
|
||||
@MainActor final class SingleLineUILabelSizer {
|
||||
|
||||
let font: UIFont
|
||||
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 {
|
||||
|
||||
|
@ -74,7 +74,7 @@ struct TimelineAccessibilityCellLayout: TimelineCellLayout {
|
||||
|
||||
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
|
||||
|
||||
|
@ -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
|
||||
r.origin = point
|
||||
|
@ -109,7 +109,7 @@ struct TimelineDefaultCellLayout: TimelineCellLayout {
|
||||
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user