Skip to content

Commit c86c79e

Browse files
committed
Notification as NSNotification 🤷
1 parent 08d6a74 commit c86c79e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

BeeSwift/Gallery/GalleryViewController.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,15 +447,14 @@ class GalleryViewController: UIViewController, UICollectionViewDelegateFlowLayou
447447
}
448448

449449
@objc func openGoalFromNotification(_ notification: Notification) {
450-
guard let notif = notification as NSNotification? else { return }
451450
var matchingGoal: Goal?
452-
453-
if let identifier = notif.userInfo?["identifier"] as? String {
451+
452+
if let identifier = notification.userInfo?["identifier"] as? String {
454453
if let url = URL(string: identifier), let objectID = viewContext.persistentStoreCoordinator?.managedObjectID(forURIRepresentation: url) {
455454
matchingGoal = viewContext.object(with: objectID) as? Goal
456455
}
457456
}
458-
else if let slug = notif.userInfo?["slug"] as? String {
457+
else if let slug = notification.userInfo?["slug"] as? String {
459458
matchingGoal = self.allGoals.last(where: { $0.slug == slug })
460459
}
461460
if matchingGoal != nil {

0 commit comments

Comments
 (0)