From eaf36878a43353de52f7461cc4dbf9bea5f6db66 Mon Sep 17 00:00:00 2001 From: Harry <109690906+harry-signal@users.noreply.github.com> Date: Mon, 22 Apr 2024 09:57:31 -0700 Subject: [PATCH] Update media gallery view on the main thread --- Signal/src/ViewControllers/MediaGallery/MediaGallery.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Signal/src/ViewControllers/MediaGallery/MediaGallery.swift b/Signal/src/ViewControllers/MediaGallery/MediaGallery.swift index 4fde8113bc..00ade18386 100644 --- a/Signal/src/ViewControllers/MediaGallery/MediaGallery.swift +++ b/Signal/src/ViewControllers/MediaGallery/MediaGallery.swift @@ -110,11 +110,11 @@ class MediaGalleryItem: Equatable, Hashable, MediaGallerySectionItem { var attachmentId: MediaGalleryResourceId { attachmentStream.reference.mediaGalleryResourceId } - typealias AsyncThumbnailBlock = (UIImage) -> Void + typealias AsyncThumbnailBlock = @MainActor (UIImage) -> Void func thumbnailImage(async: @escaping AsyncThumbnailBlock) -> UIImage? { Task { [attachmentStream] in if let image = await attachmentStream.attachmentStream.thumbnailImage(quality: .small) { - async(image) + await async(image) } } return nil