mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Fix a crash on macOS when using QuickLook. (#5790)
Introduced by the default @MainActor isolation and macOS being weird with threads.
This commit is contained in:
@@ -153,11 +153,11 @@ private struct MediaPreviewViewController: UIViewControllerRepresentable {
|
||||
class MediaPreviewItem: NSObject, QLPreviewItem {
|
||||
let file: MediaFileHandleProxy
|
||||
|
||||
var previewItemURL: URL? {
|
||||
nonisolated var previewItemURL: URL? { // nonisolated as QuickLook can call from any thread (macOS 26).
|
||||
file.url
|
||||
}
|
||||
|
||||
let previewItemTitle: String?
|
||||
nonisolated let previewItemTitle: String? // nonisolated as QuickLook can call from any thread (macOS 26).
|
||||
|
||||
init(file: MediaFileHandleProxy, title: String?) {
|
||||
self.file = file
|
||||
|
||||
Reference in New Issue
Block a user