From 167e8c1430353baa542082e98221106e8f991caa Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Tue, 16 Apr 2024 22:37:46 -0700 Subject: [PATCH] Add main thread assertion in notification handler. --- Images/Sources/Images/AuthorAvatarDownloader.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Images/Sources/Images/AuthorAvatarDownloader.swift b/Images/Sources/Images/AuthorAvatarDownloader.swift index 9d105ee7d..db6e8df9e 100644 --- a/Images/Sources/Images/AuthorAvatarDownloader.swift +++ b/Images/Sources/Images/AuthorAvatarDownloader.swift @@ -52,6 +52,9 @@ public extension Notification.Name { } @objc func imageDidBecomeAvailable(_ note: Notification) { + + assert(Thread.isMainThread) + guard let avatarURL = note.userInfo?[ImageDownloader.imageURLKey] as? String else { return }