Add main thread assertion in notification handler.

This commit is contained in:
Brent Simmons 2024-04-16 22:37:46 -07:00
parent a3f6bfe621
commit 167e8c1430
1 changed files with 3 additions and 0 deletions

View File

@ -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
}