Skip to content

Commit 991561d

Browse files
committed
Fix concurrency warnings
1 parent 5ceb641 commit 991561d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/PulseUI/Features/Search/Services/ConsoleSearchOccurrence.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class ConsoleSearchOccurrence: Identifiable, Equatable, Hashable {
1616
let match: ConsoleSearchMatch
1717
var line: Int { match.lineNumber }
1818
var range: NSRange { NSRange(match.range, in: match.line) }
19-
lazy var preview = ConsoleSearchOccurrence.makePreview(for: match, attributes: previewAttibutes)
19+
@MainActor lazy var preview = ConsoleSearchOccurrence.makePreview(for: match, attributes: previewAttibutes)
2020
let searchContext: RichTextViewModel.SearchContext
2121

2222
init(scope: ConsoleSearchScope,
@@ -36,7 +36,7 @@ final class ConsoleSearchOccurrence: Identifiable, Equatable, Hashable {
3636
}
3737
}
3838

39-
private let previewAttibutes = TextHelper().attributes(role: .body2, style: .monospaced)
39+
@MainActor private let previewAttibutes = TextHelper().attributes(role: .body2, style: .monospaced)
4040

4141
@available(iOS 15, visionOS 1.0, *)
4242
extension ConsoleSearchOccurrence {

0 commit comments

Comments
 (0)