Skip to content

Commit af1943c

Browse files
committed
Notification as NSNotification 🤷
1 parent 3b9f23a commit af1943c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

BeeSwift/Gallery/GalleryViewController.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,15 +444,14 @@ class GalleryViewController: UIViewController, UICollectionViewDelegateFlowLayou
444444
}
445445

446446
@objc func openGoalFromNotification(_ notification: Notification) {
447-
guard let notif = notification as NSNotification? else { return }
448447
var matchingGoal: Goal?
449448

450-
if let identifier = notif.userInfo?["identifier"] as? String {
449+
if let identifier = notification.userInfo?["identifier"] as? String {
451450
if let url = URL(string: identifier), let objectID = viewContext.persistentStoreCoordinator?.managedObjectID(forURIRepresentation: url) {
452451
matchingGoal = viewContext.object(with: objectID) as? Goal
453452
}
454453
}
455-
else if let slug = notif.userInfo?["slug"] as? String {
454+
else if let slug = notification.userInfo?["slug"] as? String {
456455
matchingGoal = self.allGoals.last(where: { $0.slug == slug })
457456
}
458457
if matchingGoal != nil {

0 commit comments

Comments
 (0)