Skip to content

Commit

Permalink
Refactor: Remove unused associated object
Browse files Browse the repository at this point in the history
  • Loading branch information
whattherestimefor committed Dec 2, 2024
1 parent 7a742a1 commit f64b1f9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 1 addition & 14 deletions Mastodon/Coordinator/NeedsDependency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,4 @@ protocol NeedsDependency: AnyObject {

typealias ViewControllerWithDependencies = NeedsDependency & UIViewController

extension UISceneSession {
private struct AssociatedKeys {
static var sceneCoordinator = "SceneCoordinator"
}

weak var sceneCoordinator: SceneCoordinator? {
get {
return objc_getAssociatedObject(self, &AssociatedKeys.sceneCoordinator) as? SceneCoordinator
}
set {
objc_setAssociatedObject(self, &AssociatedKeys.sceneCoordinator, newValue, .OBJC_ASSOCIATION_ASSIGN)
}
}
}

2 changes: 0 additions & 2 deletions Mastodon/Coordinator/SceneCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ final public class SceneCoordinator {
self.scene = scene
self.sceneDelegate = sceneDelegate
self.appContext = appContext

scene.session.sceneCoordinator = self

NotificationService.shared.requestRevealNotificationPublisher
.receive(on: DispatchQueue.main)
Expand Down

0 comments on commit f64b1f9

Please sign in to comment.