Fix some concurrency warnings.
This commit is contained in:
parent
2488265012
commit
216a83771e
@ -31,7 +31,7 @@ struct FeedTableViewCellLayout {
|
||||
|
||||
let height: CGFloat
|
||||
|
||||
init(cellWidth: CGFloat, insets: UIEdgeInsets, label: UILabel, unreadCountView: FeedUnreadCountView, showingEditingControl: Bool, indent: Bool, shouldShowDisclosure: Bool) {
|
||||
@MainActor init(cellWidth: CGFloat, insets: UIEdgeInsets, label: UILabel, unreadCountView: FeedUnreadCountView, showingEditingControl: Bool, indent: Bool, shouldShowDisclosure: Bool) {
|
||||
|
||||
var initialIndent = insets.left
|
||||
if indent {
|
||||
|
@ -26,7 +26,7 @@ struct TextFieldSizeInfo {
|
||||
let numberOfLinesUsed: Int // A two-line text field may only use one line, for instance. This would equal 1, then.
|
||||
}
|
||||
|
||||
final class MultilineUILabelSizer {
|
||||
@MainActor final class MultilineUILabelSizer {
|
||||
|
||||
private let numberOfLines: Int
|
||||
private let font: UIFont
|
||||
|
@ -19,7 +19,7 @@ struct TimelineAccessibilityCellLayout: TimelineCellLayout {
|
||||
let feedNameRect: CGRect
|
||||
let dateRect: CGRect
|
||||
|
||||
init(width: CGFloat, insets: UIEdgeInsets, cellData: TimelineCellData) {
|
||||
@MainActor init(width: CGFloat, insets: UIEdgeInsets, cellData: TimelineCellData) {
|
||||
|
||||
var currentPoint = CGPoint.zero
|
||||
currentPoint.x = TimelineDefaultCellLayout.cellPadding.left + insets.left + TimelineDefaultCellLayout.unreadCircleMarginLeft
|
||||
|
@ -50,8 +50,8 @@ extension TimelineCellLayout {
|
||||
return r
|
||||
}
|
||||
|
||||
static func rectForTitle(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> (CGRect, Int) {
|
||||
|
||||
@MainActor static func rectForTitle(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat) -> (CGRect, Int) {
|
||||
|
||||
var r = CGRect.zero
|
||||
if cellData.title.isEmpty {
|
||||
return (r, 0)
|
||||
@ -71,7 +71,7 @@ extension TimelineCellLayout {
|
||||
|
||||
}
|
||||
|
||||
static func rectForSummary(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat, _ linesUsed: Int) -> CGRect {
|
||||
@MainActor static func rectForSummary(_ cellData: TimelineCellData, _ point: CGPoint, _ textAreaWidth: CGFloat, _ linesUsed: Int) -> CGRect {
|
||||
|
||||
let linesLeft = cellData.numberOfLines - linesUsed
|
||||
|
||||
|
@ -51,7 +51,7 @@ struct TimelineDefaultCellLayout: TimelineCellLayout {
|
||||
let feedNameRect: CGRect
|
||||
let dateRect: CGRect
|
||||
|
||||
init(width: CGFloat, insets: UIEdgeInsets, cellData: TimelineCellData) {
|
||||
@MainActor init(width: CGFloat, insets: UIEdgeInsets, cellData: TimelineCellData) {
|
||||
|
||||
var currentPoint = CGPoint.zero
|
||||
currentPoint.x = TimelineDefaultCellLayout.cellPadding.left + insets.left + TimelineDefaultCellLayout.unreadCircleMarginLeft
|
||||
|
Loading…
x
Reference in New Issue
Block a user